<template>
  <section class="config-pagestyle">
    <section class="set-info">
      <el-collapse accordion>
        <el-collapse-item>
          <template
            slot="title"
          >企业信息
          </template>
          <el-row :gutter="20">
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">企业名称：</span>
                <span class="item-content">{{ obj.enterpriseName || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">社会统一信用代码：</span>
                <span class="item-content">{{ obj.enterpriseCode || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">有效期：</span>
                <span
                  class="item-content"
                >{{ obj.startDate ? obj.startDate.substring(0, 10) : '' }} -- {{ obj.endDate ? obj.endDate.substring(0, 10) : '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">企业电话：</span>
                <span class="item-content">{{ obj.enterpriseTelephone || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">企业邮箱：</span>
                <span class="item-content">{{ obj.enterpriseEmail || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">所在地区：</span>
                <span class="item-content">{{ obj.regionId || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">企业网址：</span>
                <span class="item-content">{{ obj.enterpriseWebsite || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">系统主地址：</span>
                <span class="item-content">{{ obj.systemUrl1 || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">系统备用地址：</span>
                <span class="item-content">{{ obj.systemUrl2 || '' }}</span>
              </section>
            </el-col>
            <el-col :span="24">
              <section class="info-item">
                <span class="item-label">企业地址：</span>
                <span class="item-content">{{ obj.enterpriseAddress || '' }}</span>
              </section>
            </el-col>
            <el-col :span="24">
              <section class="info-item">
                <span class="item-label">企业简介：</span>
                <span class="item-content">{{ obj.enterpriseAboutus || '' }}</span>
              </section>
            </el-col>

            <el-col :span="24">
              <section class="info-item">
                <span class="item-label">备注：</span>
                <span class="item-content">{{ obj.remark || '' }}</span>
              </section>
            </el-col>
            <el-col :span="6">
              <section class="info-item">
                <span class="item-label">管理员姓名：</span>
                <span class="item-content">{{ obj.userRealname || '' }}</span>
              </section>
            </el-col>
            <el-col :span="6">
              <section class="info-item">
                <span class="item-label">管理员手机号：</span>
                <span class="item-content">{{ obj.userPhone || '' }}</span>
              </section>
            </el-col>
            <el-col :span="6">
              <section class="info-item">
                <span class="item-label">管理员性别：</span>
                <span class="item-content">{{ obj.userSex == 'MAN' ? '男' : '女' }}</span>
              </section>
            </el-col>
            <el-col :span="6">
              <section class="info-item">
                <span class="item-label">管理员邮箱：</span>
                <span class="item-content">{{ obj.userEmail || '' }}</span>
              </section>
            </el-col>
          </el-row>
        </el-collapse-item>
      </el-collapse>
    </section>

    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            管理端系统名称设置
            <el-tag size="mini">{{ form.nameTime ? '上次设置时间：' + form.nameTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <el-input v-model.trim="form.name" placeholder="请输入系统名称" style="width: 50%" />
            <el-button :loading="loading4name" type="primary" style="margin-left: 10px" @click="handleComit('name')">确 定 </el-button>
            <section class="inner-explain"><i class="el-icon-warning-outline" />自定义管理端登录页展示的系统名称。</section>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>

    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            管理端登录页logo设置
            <el-tag size="mini">{{ form.loginlogoTime ? '上次设置时间：' + form.loginlogoTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="10px">
              <el-form-item label>
                <image-cropper
                  v-model="form.loginlogo"
                  :preview-id="upload4loginlogo.viewId"
                  :width="390"
                  :view="upload4loginlogo.view"
                  :height="54"
                  :url="upload4loginlogo.uploadaction"
                  :no-circle="true"
                  :no-rotate="false"
                  :show-tip="false"
                  :default-image="upload4loginlogo.default"
                  :is-sign="true"
                  :sign-img-src="upload4loginlogo.signImgSrc"
                  lang-type="zh"
                  @changeImg="upload4loginlogo.change"
                />
                <section class="inner-explain">
                  <i class="el-icon-warning-outline" />自定义管理端登录页展示的系统logo。请上传尺寸为的390px*54px图片。图片格式为jpg、png。
                </section>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>

    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            管理端登录页背景图设置
            <el-tag size="mini">{{ form.loginbgTime ? '上次设置时间：' + form.loginbgTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="10px">
              <el-form-item label>
                <image-cropper
                  v-model="form.loginbg"
                  :preview-id="upload4loginbg.viewId"
                  :width="1920"
                  :view="upload4loginbg.view"
                  :height="1080"
                  :url="upload4loginbg.uploadaction"
                  :no-circle="true"
                  :no-rotate="false"
                  :show-tip="false"
                  :default-image="upload4loginbg.default"
                  :is-sign="true"
                  :sign-img-src="upload4loginbg.signImgSrc"
                  lang-type="zh"
                  @changeImg="upload4loginbg.change"
                />
                <section class="inner-explain">
                  <i class="el-icon-warning-outline" />自定义管理端登录界面背景图。请上传尺寸为的1920px*1080px图片。图片格式为jpg、png。
                </section>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>

    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            管理端首页logo设置
            <el-tag size="mini">{{ form.logoTime ? '上次设置时间：' + form.logoTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="10px">
              <el-form-item label>
                <image-cropper
                  v-model="form.logo"
                  :preview-id="upload4logo.viewId"
                  :width="318"
                  :view="upload4logo.view"
                  :height="44"
                  :url="upload4logo.uploadaction"
                  :no-circle="true"
                  :no-rotate="false"
                  :show-tip="false"
                  :default-image="upload4logo.default"
                  :is-sign="true"
                  :sign-img-src="upload4logo.signImgSrc"
                  lang-type="zh"
                  @changeImg="upload4logo.change"
                />
                <section class="inner-explain">
                  <i class="el-icon-warning-outline" />自定义管理端界面左上角的系统logo。请上传尺寸为的318px*44px图片。图片格式为jpg、png。
                </section>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端系统名称设置
            <el-tag size="mini">{{
                form.appfullnameTime ? '上次设置时间：' + form.appfullnameTime : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <el-input
                v-model.trim="form.appfullname"
                placeholder="请输入系统名称"
                style="width: 50%"
            />
            <el-button
                :loading="loading4appfullname"
                type="primary"
                style="margin-left: 10px"
                @click="handleComit('appfullname')"
            >确 定
            </el-button>
            <section class="inner-explain">
              <i
                  class="el-icon-warning-outline"
              />自定义职工端的系统名称。
            </section>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端系统简写名称设置
            <el-tag size="mini">{{ form.appnameTime ? '上次设置时间：' + form.appnameTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <el-input v-model.trim="form.appname" placeholder="请输入系统名称" style="width: 50%" />
            <el-button :loading="loading4appname" type="primary" style="margin-left: 10px" @click="handleComit('appname')">确 定 </el-button>
            <section class="inner-explain"><i class="el-icon-warning-outline" />自定义职工端学习页面等展示的系统名称。</section>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端登录页logo设置
            <el-tag size="mini">{{ form.applogoTime ? '上次设置时间：' + form.applogoTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="10px">
              <el-form-item label>
                <image-cropper
                  v-model="form.applogo"
                  :preview-id="upload4apploginlogo.viewId"
                  :width="534"
                  :view="upload4apploginlogo.view"
                  :height="74"
                  :url="upload4apploginlogo.uploadaction"
                  :no-circle="true"
                  :no-rotate="false"
                  :show-tip="false"
                  :default-image="upload4apploginlogo.default"
                  :is-sign="true"
                  :sign-img-src="upload4apploginlogo.signImgSrc"
                  lang-type="zh"
                  @changeImg="upload4apploginlogo.change"
                />
                <section class="inner-explain">
                  <i class="el-icon-warning-outline" />自定义职工端登录页展示的系统logo。请上传尺寸为的534px*74px图片。图片格式为jpg、png。
                </section>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>

    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端首页logo设置
            <el-tag
                size="mini"
            >{{
                form.apphomelogoTime
                    ? '上次设置时间：' + form.apphomelogoTime
                    : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="10px">
              <el-form-item label>
                <image-cropper
                    v-model="form.bg"
                    :preview-id="upload4applogo.viewId"
                    :width="464"
                    :view="upload4applogo.view"
                    :height="64"
                    :url="upload4applogo.uploadaction"
                    :no-circle="true"
                    :no-rotate="false"
                    :show-tip="false"
                    :default-image="upload4applogo.default"
                    :is-sign="true"
                    :sign-img-src="upload4applogo.signImgSrc"
                    lang-type="zh"
                    @changeImg="upload4applogo.change"
                />
                <section class="inner-explain">
                  <i class="el-icon-warning-outline"/>
                  <section>
                    <p>
                      1、自定义职工端首页左上角的系统logo。请上传尺寸为的464px*64px图片。图片格式为jpg、png。
                    </p>
                    <p>2、Logo中应包含职工端系统名称。</p>
                  </section>
                </section>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->

    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端主题色设置
            <el-tag size="mini">{{ form.colorTime ? '上次设置时间：' + form.colorTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" class="main-form" label-position="right" label-width="10px">
              <el-form-item label>
                <section class="color-inner">
                  <section
                    v-for="(item, index) in color"
                    :key="index"
                    class="inner-item"
                    :class="{ active: form.color == item.name }"
                    :style="{ 'background-color': item.color }"
                    @click="handleSelectColor(item.name)"
                  >
                    <i class="el-icon-check" />
                  </section>
                  <el-button :loading="loading4color" type="primary" style="margin-left: 10px" @click="handleComit('color')">确定 </el-button>
                </section>
                <section class="inner-explain"><i class="el-icon-warning-outline" />自定义职工端页面的主题色。</section>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端默认微信分享内容设置（仅对已对接微信有效）
            <el-tag size="mini">{{ form.wxShareContentTime ? '上次设置时间：' + form.wxShareContentTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" class="main-form" label-position="right" label-width="80px" :loading="loading4wxshare">
              <el-form-item label="标题">
                <el-input v-model.trim="form.wxShareTitle" placeholder="请输入系统微信分享标题" style="width: 50%" />
              </el-form-item>
              <el-form-item label="简介">
                <el-input v-model.trim="form.wxShareDesc" placeholder="请输入系统微信分享简介" style="width: 50%" />
              </el-form-item>
              <el-form-item label="链接地址">
                <el-input v-model.trim="form.wxShareLink" placeholder="请输入系统微信分享链接地址(以http或https开头)" style="width: 50%" />
              </el-form-item>
              <el-form-item label="封面">
                <image-upload
                  v-model="form.wxShareCover"
                  :preview-id="upload4wxshare.viewId"
                  :forever="true"
                  :width="100"
                  :view="upload4wxshare.view"
                  :height="100"
                  :no-circle="true"
                  :no-rotate="false"
                  lang-type="zh"
                />
                <section class="inner-explain">
                  <i class="el-icon-warning-outline" />自定义微信分享封面。请上传尺寸为的100px*100px图片。图片格式为jpg、png。
                </section>
              </el-form-item>
              <el-button :loading="loading4wxshare" type="primary" style="margin-left: 80px" @click="handleComit('wxShareContent')">确定 </el-button>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端首页金刚区入口设置
            <el-tag size="mini">{{
                form.homemenuTime ? '上次设置时间：' + form.homemenuTime : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <section class="inner-txt">
              <el-tag>自定义职工端首页金刚区入口展示项和顺序。可通过鼠标拖动进行调整。</el-tag>
            </section>
            <section class="inner-draggable">
              <v-draggable
                  :key="1"
                  :number="7"
                  :list="homemenu"
                  :group="'homemenu'"
                  class="draggable-item"
                  header-text="入口设置"
                  :show-del="true"
                  @edit="handleEdit"
                  @delete="deleteInlet"
              />
            </section>
            <div style="text-align: center">
              <el-button
                  type="primary"
                  style=" margin: 10px auto"
                  v-if="homemenu.length<8"
                  @click="addInlet('homemenu')"
              >添 加
              </el-button>
              <el-button
                  :loading="loading4homemenu"
                  type="primary"
                  style=" margin: 10px auto"
                  @click="handleComit('homemenu')"
              >确 定
              </el-button>
            </div>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端首页快捷入口设置
            <el-tag size="mini">{{
                form.menuTime ? '上次设置时间：' + form.menuTime : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <section class="inner-txt">
              <el-tag>自定义职工端首页快捷入口的展示项和顺序。可通过鼠标拖动进行调整。</el-tag>
            </section>
            <section class="inner-draggable">
              <v-draggable
                  :key="1"
                  :number="1"
                  :list="listone"
                  :group="group"
                  class="draggable-item"
                  header-text="第一屏"
                  @edit="handleEdit"
              />
              <v-draggable
                  :key="2"
                  :number="2"
                  :list="listtwo"
                  :group="group"
                  class="draggable-item"
                  header-text="第二屏"
                  @edit="handleEdit"
              />
              <v-draggable
                  :key="3"
                  :number="3"
                  :list="listthree"
                  :group="group"
                  class="draggable-item"
                  header-text="第三屏"
                  @edit="handleEdit"
              />
            </section>
            <el-button
                :loading="loading4menu"
                type="primary"
                style="display: block; margin: 10px auto"
                @click="handleComit('menu')"
            >确 定
            </el-button>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!-- 职工端底部菜单 -->
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端首页底部导航设置
            <el-tag size="mini">{{ form.tabBarTime ? '上次设置时间：' + form.tabBarTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <section class="inner-txt">
              <el-tag>自定义职工端首页底部导航的展示项和顺序。可通过鼠标拖动进行调整。</el-tag>
            </section>
            <section class="inner-draggable1">
              <section>
                <v-tab-bar
                  :key="1"
                  :number="10"
                  :list="tabBarList"
                  group="tabBar"
                  class="draggable-item"
                  header-text="职工端首页底部导航"
                  @edit="handleSubMenu"
                  @handleAdd="handleIconAdd"
                  @handleDelete="handleDelete"
                />
              </section>
              <el-button
                :loading="loadingTabBar"
                type="primary"
                style="display: block; margin: 10px auto"
                @click="handleComit('tabBar')"
              >确 定
              </el-button>
            </section>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <!--
        <section class="set-card">
          <el-collapse accordion>
            <el-collapse-item>
              <template slot="title">
                职工端常用功能设置
                <el-tag size="mini">{{
                    form.usedTime ? '上次设置时间：' + form.usedTime : '未设置'
                  }}
                </el-tag>
              </template>
              <section class="card-inner">
                <section class="inner-txt">
                  <el-tag>自定义职工端首页常用功能的展示项和顺序。可通过鼠标拖动进行调整。</el-tag>
                </section>
                <section class="inner-draggable">
                  <v-draggable
                      :key="4"
                      :number="4"
                      :list="listusedone"
                      :group="'used'"
                      class="draggable-item"
                      header-text="第一列"
                      @edit="handleUsedEdit"
                  />
                  <v-draggable
                      :key="5"
                      :number="5"
                      :list="listusedtwo"
                      :group="'used'"
                      class="draggable-item"
                      header-text="第二列"
                      @edit="handleUsedEdit"
                  />
                </section>
                <el-button
                    :loading="loading4used"
                    type="primary"
                    style="display: block; margin: 10px auto"
                    @click="handleComit('used')"
                >确 定
                </el-button>
              </section>
            </el-collapse-item>
          </el-collapse>
        </section> -->

    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端服务设置
            <el-tag size="mini">{{
                form.serviceTime ? '上次设置时间：' + form.serviceTime : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <section class="inner-txt">
              <el-tag>自定义职工端服务模块快捷入口展示项和顺序。可通过鼠标拖动进行调整。</el-tag>
            </section>
            <section class="inner-draggable">
              <v-drag
                  :key="6"
                  :number="6"
                  :list="listservice"
                  :group="'service'"
                  class="draggable-item"
                  header-text="快捷入口设置"
                  @edit="handleServiceEdit"
                  @add="handleServiceAdd"
                  @remove="handleServiceRemove"
                  @iconedit="handleServiceIconEdit"
                  @iconremove="handleServiceIconRemove"
                  @iconadd="handleServiceIconAdd"
              />
            </section>
            <el-button
                :loading="loading4service"
                type="primary"
                style="display: block; margin: 10px auto"
                @click="handleComit('service')"
            >确 定
            </el-button>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->

    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端新闻类模块策略设置
            <el-tag size="mini">{{ form.newsTime ? '上次设置时间：' + form.newsTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <section class="inner-txt">
              <el-tag>自定义职工端新闻类模块访问、评论、点赞、评分策略</el-tag>
            </section>
            <section class="inner-table">
              <el-table
                :data="listnews"
                :span-method="arraySpanMethod"
                style="width: 100%; margin-bottom: 20px"
                row-key="id"
                size="mini"
                :indent="30"
              >
                <el-table-column label="模块名称">
                  <template slot-scope="scope">
                    <el-input v-if="scope.row.name !== 'default'" v-model="scope.row.name" class="edit-input" size="small" />
                    <section v-else style="text-align: center;">
                      默认访问策略
                    </section>
                  </template>
                </el-table-column>
                <el-table-column label="模块代码">
                  <template slot-scope="scope">
                    <el-input
                      v-if="scope.row.code !== 'default'"
                      v-model="scope.row.code"
                      class="edit-input"
                      size="small"
                      @blur="handleCodeBlur($event, scope.row)"
                    />
                  </template>
                </el-table-column>
                <el-table-column label="访问策略" width="880">
                  <template slot-scope="scope">
                    <section class="news-item">
                      <el-radio-group v-model="scope.row.view">
                        <el-radio :label="0">无需登录</el-radio>
                        <el-radio :label="1">注册用户可见</el-radio>
                        <el-radio :label="2">认证用户可见</el-radio>
                        <el-radio :label="-1">模块自定义</el-radio>
                      </el-radio-group>
                    </section>
                    <section class="news-item">
                      <el-radio-group v-model="scope.row.rate">
                        <el-radio :label="0">不允许评分</el-radio>
                        <el-radio :label="1">允许评分</el-radio>
                      </el-radio-group>
                    </section>
                    <section class="news-item">
                      <el-radio-group v-model="scope.row.like">
                        <el-radio :label="0">不允许点赞</el-radio>
                        <el-radio :label="1">允许点赞、不允许踩</el-radio>
                        <el-radio :label="2">允许点赞和踩</el-radio>
                      </el-radio-group>
                    </section>
                    <section class="news-item">
                      <el-radio-group v-model="scope.row.comment">
                        <el-radio :label="0">不允许评论（不展示已有评论） </el-radio>
                        <el-radio :label="1">不允许评论（展示已有评论） </el-radio>
                        <el-radio :label="2">允许评论（不需要审核）</el-radio>
                        <el-radio :label="3">允许评论（需要审核）</el-radio>
                      </el-radio-group>
                    </section>
                  </template>
                </el-table-column>
                <el-table-column label="操作" width="50">
                  <template slot-scope="scope">
                    <el-button
                      v-if="scope.row.code != 'default'"
                      type="text"
                      style="color: #18a5fd; font-size: 14px"
                      @click="handleNewsDelete(scope)"
                    >删除
                    </el-button>
                  </template>
                </el-table-column>
              </el-table>
            </section>
            <section class="news-add" @click="handleNewsAdd">添 加</section>
            <el-button
              :loading="loading4news"
              type="primary"
              style="display: block; margin: 10px auto"
              @click="handleComit('news')"
            >确 定
            </el-button>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <!-- 浮动图标设置   -->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端浮动图标设置
            <el-tag
                size="mini"
            >{{
                form.floatImgUpdTime
                    ? '上次设置时间：' + form.floatImgUpdTime
                    : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="10px">
              <el-form-item label>
                <image-cropper
                    v-model="form.floatImg"
                    :preview-id="upload4appfloatImg.viewId"
                    :width="140"
                    :view="upload4appfloatImg.view"
                    :height="140"
                    :url="upload4appfloatImg.uploadaction"
                    :no-circle="true"
                    :no-rotate="false"
                    :show-tip="false"
                    lang-type="zh"
                    :is-sign="true"
                    :sign-img-src="upload4appfloatImg.signImgSrc"
                    @changeImg="upload4appfloatImg.change"
                />
                <section class="inner-explain">
                  <i class="el-icon-warning-outline"/>
                  <section>
                    <p>请上传尺寸为的140px*140px图片。图片格式为jpg、png。</p>
                  </section>
                </section>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!-- 浮动图标其他设置   -->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端浮动图标相关设置
            <el-tag
                size="mini"
            >{{
                form.floatImgConfigUpdTime
                    ? '上次设置时间：' + form.floatImgConfigUpdTime
                    : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="120px">
              <el-form-item label="链接类型" prop="linkType">
                <el-radio-group v-model="form.linkType">
                  <el-radio label="1">内部链接</el-radio>
                  <el-radio label="2">外部链接</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="链接地址" prop="linkAddress">
                <el-input
                    v-model="form.linkAddress"
                    placeholder="请输入链接地址"
                />
              </el-form-item>
              <el-form-item label="展示起止时间" prop="time">
                <el-date-picker
                    v-model="form.floatImgShowTime"
                    range-separator="至"
                    start-placeholder="开始时间"
                    end-placeholder="结束时间"
                    clearable
                    type="datetimerange"
                    format="yyyy-MM-dd HH:mm"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    :default-time="['00:00:00', '23:59:59']"
                />
              </el-form-item>
              <el-form-item>
                <el-button
                    :loading="loading4floatImg"
                    type="primary"
                    @click="handleComit('floatImgConfig')"
                >确 定
                </el-button>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!--敏感词语转义设置-->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            敏感词语转义设置
            <el-tag size="mini">{{
                form.wordsTransformTime
                    ? '上次设置时间：' + form.wordsTransformTime
                    : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <section class="inner-txt">
              <el-tag>自定义职工端现金类词语转义</el-tag>
            </section>
            <section class="inner-table">
              <el-table
                  :data="form.wordsTransform"
                  style="width: 70%; margin: 0 auto"
                  row-key="id"
                  size="mini"
                  :indent="30"
              >
                <el-table-column label="标识" width="130">
                  <template slot-scope="scope">
                    <el-input
                        v-model="scope.row.code"
                        class="edit-input"
                        size="small"
                    />
                  </template>
                </el-table-column>
                <el-table-column label="名称">
                  <template slot-scope="scope">
                    <el-input
                        v-model="scope.row.name"
                        class="edit-input"
                        size="small"
                    />
                  </template>
                </el-table-column>
                <el-table-column label="操作" width="80">
                  <template slot-scope="scope">
                    <el-button
                        size="small"
                        type="text"
                        @click="delWordsItem(scope.$index, scope.row)"
                    >删除
                    </el-button>
                  </template>
                </el-table-column>
              </el-table>
            </section>

            <section
                style="width: 68%; margin: 0 auto; margin-bottom: 20px"
                class="news-add"
                @click="handleWordsAdd"
            >
              添 加
            </section>
            <el-button
                :loading="loading4words"
                type="primary"
                style="display: block; margin: 10px auto"
                @click="handleComit('wordsTransform')"
            >确 定
            </el-button>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->

    <!--菜单名称转义设置-->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            菜单名称转义设置
            <el-tag size="mini">{{
                form.menuNameTransformTime
                    ? '上次设置时间：' + form.menuNameTransformTime
                    : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <section class="inner-txt">
              <el-tag>自定义职工端菜单名称转义</el-tag>
            </section>
            <section class="inner-table">
              <el-table
                  :data="form.menuNameTransform"
                  style="width: 70%; margin: 0 auto"
                  row-key="id"
                  size="mini"
                  :indent="30"
              >
                <el-table-column label="标识" width="130">
                  <template slot-scope="scope">
                    <el-input
                        v-model="scope.row.code"
                        class="edit-input"
                        size="small"
                    />
                  </template>
                </el-table-column>
                <el-table-column label="名称">
                  <template slot-scope="scope">
                    <el-input
                        v-model="scope.row.name"
                        class="edit-input"
                        size="small"
                    />
                  </template>
                </el-table-column>
                <el-table-column label="操作" width="80">
                  <template slot-scope="scope">
                    <el-button
                        size="small"
                        type="text"
                        @click="delMenuNameItem(scope.$index, scope.row)"
                    >删除
                    </el-button>
                  </template>
                </el-table-column>
              </el-table>
            </section>

            <section
                style="width: 68%; margin: 0 auto; margin-bottom: 20px"
                class="news-add"
                @click="handleMenuNameAdd"
            >
              添 加
            </section>
            <el-button
                :loading="loading4words"
                type="primary"
                style="display: block; margin: 10px auto"
                @click="handleComit('menuNameTransform')"
            >确 定
            </el-button>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!-- 职工端title设置   -->
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端浏览器标题设置
            <el-tag size="mini">{{ form.tabBarTime ? '上次设置时间：' + form.tabBarTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="130px">
              <el-form-item label="职工端浏览器标题" prop="workerTitle">
                <el-input v-model="form.workerTitle" placeholder="请输入职工端浏览器标题" />
              </el-form-item>
              <el-form-item>
                <el-button
                  :loading="loadingTitle"
                  style="display: block; margin: 10px auto"
                  type="primary"
                  @click="handleComit('workerTitle')"
                >确 定
                </el-button>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <!-- 职工端新闻分类配置   -->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端新闻分类配置
            <el-tag
                size="mini"
            >{{
                form.newTypeTime
                    ? '上次设置时间：' + form.newTypeTime
                    : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="130px">
              <el-table :data="tableData" stripe style="width: 100%">
                <el-table-column prop="classifyName" label="分类名称"/>
                <el-table-column prop="indexStatus" label="首页是否展示—排序">
                  <template slot-scope="scope">
                    <el-switch v-model="scope.row.indexStatus"/>
                    <el-tooltip
                        class="item"
                        effect="dark"
                        content="排序为越大越靠前"
                        placement="top"
                    >
                      <el-input-number
                          v-model="scope.row.indexSort"
                          placeholder="排序为越大越靠前"
                          :controls="false"
                      />
                    </el-tooltip>
                  </template>
                </el-table-column>
                <el-table-column prop="listStatus" label="列表是否展示—排序">
                  <template slot-scope="scope">
                    <el-switch v-model="scope.row.listStatus"/>
                    <el-tooltip
                        class="item"
                        effect="dark"
                        content="排序为越大越靠前"
                        placement="top"
                    >
                      <el-input-number
                          v-model="scope.row.listSort"
                          placeholder="排序为越大越靠前"
                          :controls="false"
                      />
                    </el-tooltip>
                  </template>
                </el-table-column>
              </el-table>
              <el-button
                  :loading="loadingNewType"
                  style="display: block; margin: 10px auto"
                  type="primary"
                  @click="handleComit('newType')"
              >确 定
              </el-button>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!-- 职工端首页课程分类九宫格配置   -->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端首页课程分类九宫格配置
            <el-tag
                size="mini"
            >{{
                form.courseCategory9Time
                    ? '上次设置时间：' + form.courseCategory9Time
                    : '未设置'
              }}
            </el-tag>
          </template>
          <course-classify-tree key="coursetree9" :checked="form.courseCategory9" :origin="addCourseOrigin"
                                @close="visible4coursetree9 = false" @success="setCourseCategory9"
                                v-if="visible4coursetree9"
          ></course-classify-tree>
          <section class="card-inner" width="50%">
            <el-row :gutter="20" class="select-course-category">
              <el-col :span="24">
                <div class="course-category-add course" v-if="form.courseCategory9.length < 9"
                     @click="addCourseOrigin = 'company',visible4coursetree9 = true"
                >添加本单位课程分类
                </div>
                <div class="course-category-add course" v-if="form.courseCategory9.length < 9"
                     @click="addCourseOrigin = 'saas',visible4coursetree9 = true"
                >添加平台课程分类
                </div>
              </el-col>
              <draggable v-model="form.courseCategory9" :animation="340" handle=".course-category-move"
                         draggable=".drag-item"
              >
                <el-col class="drag-item" :span="8" v-for="(item, index) in form.courseCategory9">
                  <el-input placeholder="请输入内容" v-model="item.classifyName">
                    <el-button slot="prepend" class="course-category-move" icon="el-icon-rank"></el-button>
                    <el-button slot="append" icon="el-icon-delete" @click="form.courseCategory9.splice(index, 1)"
                    ></el-button>
                  </el-input>
                  <el-tag class="course-category-origin" :type="item.origin === 'saas' ? 'success' : 'danger'"
                          size="mini"
                  >{{ item.origin === 'saas' ? '平台' : '单位' }}
                  </el-tag>
                </el-col>
              </draggable>

            </el-row>
            <section class="inner-explain">
              <i class="el-icon-warning-outline"/>自定义职工端课程分类九宫格展示内容。
            </section>
            <section class="inner-explain">
              <i class="el-icon-warning-outline"/>请尽量添加9中课程分类且分类名称字数小于8个字符，以免影响职工端展示效果。
            </section>
            <section class="inner-explain">
              <i class="el-icon-warning-outline"/>选择课程分类后，按住分类名称左边的图标拖动可调整顺序。
            </section>
            <el-button
                :loading="loadingCourseCategory9"
                style="display: block; margin: 10px auto"
                type="primary"
                @click="handleComit('courseCategory9')"
            >确 定
            </el-button>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!-- 职工端首页课程展示配置   -->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端首页课程展示配置
            <el-tag
                size="mini"
            >{{
                form.tableData4courseTime
                    ? '上次设置时间：' + form.tableData4courseTime
                    : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <course-classify-tree key="coursetree" :origin="addCourseOrigin" @close="visible4coursetree = false"
                                  @success="setCourseCategory" v-if="visible4coursetree"
            ></course-classify-tree>
            <div class="course-category-add course" @click="addCourseOrigin = 'company', visible4coursetree = true">
              按本单位课程分类添加
            </div>
            <div class="course-category-add course" @click="addCourseOrigin = 'company', visible4Label = true">
              输入本单位标签添加
            </div>
            <div class="course-category-add course" @click="addCourseOrigin = 'saas', visible4coursetree = true">
              按平台课程分类添加
            </div>
            <div class="course-category-add course" @click="addCourseOrigin = 'saas', visible4Label = true">输入平台标签添加
            </div>
            <el-form ref="courseForm" :rules="courseRules" :model="form">
              <el-table :header-cell-class-name="starAdd" class="course-category-table"
                        :data="form.tableData4courseContent" stripe style="width: 100%"
              >
                <el-table-column prop="moduleName" label="模块名称">
                  <template slot-scope="scope">
                    <el-form-item :prop="'tableData4courseContent.' + scope.$index + '.moduleName' "
                                  :rules="courseRules.moduleName"
                    >
                      <el-input style="margin-top: 20px;" v-model="scope.row.moduleName"></el-input>
                    </el-form-item>
                  </template>
                </el-table-column>
                <el-table-column prop="type" :formatter="getType" label="模块类型"></el-table-column>
                <el-table-column prop="typeValue" :formatter="getTypeValue" label="所属分类/标签">
                </el-table-column>
                <el-table-column prop="moduleName" label="展示Id">
                  <template slot-scope="scope">
                    <el-form-item :prop="'tableData4courseContent.' + scope.$index + '.showId' "
                                  :rules="courseRules.showId"
                    >
                      <el-input style="margin-top: 20px;" v-model="scope.row.showId"></el-input>
                    </el-form-item>
                  </template>
                </el-table-column>
                <el-table-column prop="moduleName" label="展示数量">
                  <template slot-scope="scope">
                    <el-form-item :prop="'tableData4courseContent.' + scope.$index + '.num' " :rules="courseRules.num">
                      <el-input style="margin-top: 20px;" type="number" v-model="scope.row.num"></el-input>
                    </el-form-item>
                  </template>
                </el-table-column>
                <el-table-column prop="moduleName" label="更多跳转地址">
                  <template slot-scope="scope">
                    <el-form-item>
                      <el-input style="margin-top: 20px;" v-model="scope.row.jumpUrl"></el-input>
                    </el-form-item>
                  </template>
                </el-table-column>
                <el-table-column prop="moduleName" label="接口地址">
                  <template slot-scope="scope">
                    <el-form-item>
                      <el-input style="margin-top: 20px;" v-model="scope.row.port"></el-input>
                    </el-form-item>
                  </template>
                </el-table-column>
                <el-table-column label="操作" align="center" min-width="60" class-name="small-padding fixed-width">
                  <template slot-scope="scope">
                    <el-button type="text" size="mini" @click="handleDeleteIndexCourse(scope)">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
            </el-form>
            <section class="inner-explain">
              <i class="el-icon-warning-outline"/>自定义职工端首页课程展示内容。
            </section>
            <el-button
                :loading="loadingCourseContent"
                style="display: block; margin: 10px auto"
                type="primary"
                @click="handleComit('courseContent')"
            >确 定
            </el-button>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!-- 职工端首页直播配置-->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端首页直播配置
            <el-tag
                size="mini"
            >{{
                form.liveTime
                    ? '上次设置时间：' + form.liveTime
                    : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <div class="course-category-add" @click="visible4Choose = true,chooseType='live'">添加直播</div>
            <el-form style="margin-top: 20px;" :model="form" label-position="right" label-width="130px">
              <el-table :data="liveData" stripe style="width: 100%">
                <el-table-column prop="name" label="直播名称"/>
                <el-table-column prop="type" label="类型">
                  <template slot-scope="score">
                    <span>{{ score.row.type === '1' ? '系统内' : '系统外' }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="操作" align="center" min-width="60" class-name="small-padding fixed-width">
                  <template slot-scope="scope">
                    <el-button type="text" size="mini" @click="handleDeleteIndex4Type(scope,'live')">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
              <el-button
                  :loading="loading4Live"
                  style="display: block; margin: 10px auto"
                  type="primary"
                  @click="handleComit('live')"
              >确 定
              </el-button>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!-- 职工端首页创新工作室设置   -->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端首页创新工作室设置
            <el-tag
                size="mini"
            >{{
                form.workRoomTime ? '上次设置时间：' + form.workRoomTime : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <div class="course-category-add" @click="visible4Choose = true,chooseType='workRoom'">添加创新工作室</div>
            <el-form style="margin-top: 20px;" :model="form" label-position="right" label-width="130px">
              <el-table :data="workRoom" stripe style="width: 100%">
                <el-table-column prop="name" label="工作室名称"/>
                <el-table-column label="操作" align="center" min-width="60" class-name="small-padding fixed-width">
                  <template slot-scope="scope">
                    <el-button type="text" size="mini" @click="handleDeleteIndex4Type(scope)">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
              <el-button
                  :loading="loading4workRoom"
                  style="display: block; margin: 10px auto"
                  type="primary"
                  @click="handleComit('workRoom')"
              >确 定
              </el-button>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!-- 职工端首页外链配置-->
    <!-- <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            职工端首页外链配置
            <el-tag
                size="mini"
            >{{
                form.otherLinkTime ? '上次设置时间：' + form.otherLinkTime : '未设置'
              }}
            </el-tag>
          </template>
          <section class="card-inner">
            <div class="course-category-add" style="margin-bottom:20px;" @click="showCopy = true">上传图片</div>
            <el-form :model="form" label-position="right" label-width="130px">
              <el-form-item label="首页外链配置" prop="otherLink">
                <json-editor
                    style="height: 500px;"
                    v-model="form.otherLink"
                    :value="form.otherLink"
                    :show-btns="false"
                    :mode="'code'"
                    lang="zh"
                    @has-error="
                (err) => {
                  jsonHasErr = err
                }
              "
                />
              </el-form-item>
              <el-form-item>
                <el-button
                    :loading="loading4otherLink"
                    style="display: block; margin: 10px auto"
                    type="primary"
                    @click="handleComit('otherLink')"
                >确 定
                </el-button>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section> -->
    <!--  系统页脚配置  -->
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            系统页脚配置
            <el-tag size="mini">{{ form.pageFooterTime ? '上次设置时间：' + form.pageFooterTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner" width="50%">
            <el-row :gutter="20" class="select-course-category">
              <el-col :span="24">
                <div class="course-category-add course" @click="addPageFooter">添加</div>
              </el-col>
              <draggable v-model="form.pageFooter" :animation="340" handle=".page-footer-move" draggable=".drag-item">
                <el-col v-for="(item, index) in form.pageFooter" class="drag-item" :offset="6" :span="12">
                  <el-input v-model="item.value" placeholder="请输入内容">
                    <el-button slot="prepend" class="page-footer-move" icon="el-icon-rank" />
                    <el-button slot="append" icon="el-icon-delete" @click="form.pageFooter.splice(index, 1)" />
                  </el-input>
                </el-col>
              </draggable>
            </el-row>
            <section class="inner-explain"><i class="el-icon-warning-outline" />自定义页脚内容。</section>
            <section class="inner-explain"><i class="el-icon-warning-outline" />按住左边的图标拖动可调整顺序。</section>
            <el-button
              :loading="loading4pageFooter"
              style="display: block; margin: 10px auto"
              type="primary"
              @click="handleComit('pageFooter')"
            >确 定
            </el-button>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <!--  开屏页配置  -->
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            开屏页配置
            <el-tag size="mini">{{ form.screenTime ? '上次设置时间：' + form.screenTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner screen-config-content">
            <div class="select-btn" @click="addScreenImg">添加图片</div>
            <section style="font-size: 12px; color:red; line-height: 40px;">
              <i class="el-icon-warning-outline" />尺寸要求：不小于720*1280（1080*1920），单张图片不能超过1M。
            </section>
            <el-row :gutter="8">
              <draggable v-if="screenImgs.length" v-model="screenImgs" :animation="340" handle=".screen-img-move">
                <el-col v-for="(item, index) in screenImgs" :key="index" :span="4">
                  <el-card class="item-screen-content">
                    <el-image
                      :fit="'cover'"
                      :src="item.ossPath ? item.ossPath : uploadFile.view + item.imgId"
                      :preview-src-list="[item.ossPath ? item.ossPath : uploadFile.view + item.imgId]"
                    >
                      <div slot="error" class="image-slot">
                        <i class="el-icon-picture-outline" />
                      </div>
                    </el-image>
                    <section :style="{ marginTop: '10px', marginBottom: '10px' }">
                      <div>
                        <span class="demonstration">请选择图片背景颜色</span>
                        <el-color-picker v-model="item.background" />
                      </div>
                      <el-input v-model="item.link" :style="{ marginTop: '10px' }" placeholder="请输入图片访问地址(没有可不写)" />
                    </section>
                    <el-tooltip class="item" effect="dark" content="点击删除" placement="top">
                      <el-button style="padding: 3px 0; font-size: 22px;" type="text" icon="el-icon-close" @click="screenImgDel(item, index)" />
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="拖动调整顺序" placement="top">
                      <el-button class="screen-img-move" style="padding: 3px 0; font-size: 22px;" type="text" icon="el-icon-rank" />
                    </el-tooltip>
                  </el-card>
                </el-col>
              </draggable>
            </el-row>

            <el-form ref="form" :model="screenForm" :rules="screenFormRules" class="form" :style="{ padding: '20px' }">
              <el-form-item label="是否展示开屏图" prop="isValid">
                <el-switch v-model="screenForm.isValid" />
              </el-form-item>
              <el-form-item label="展示位置" prop="sceneList" style="margin-top:15px;">
                <el-checkbox-group v-model="sceneList">
                  <el-checkbox v-for="v in dict.ZDCJTZ" :key="v.dictValue" :label="v.dictValue">
                    {{ v.dictName }}
                  </el-checkbox>
                </el-checkbox-group>
              </el-form-item>
              <el-form-item label="开屏图展示时长(秒)" prop="duration">
                <el-input v-model.number="screenForm.duration" placeholder="请输入开屏图展示时长(单位：秒)" clearable :style="{ width: '50%' }" />
              </el-form-item>
              <el-form-item label="是否自动轮播" prop="isAuto">
                <el-radio-group v-model="screenForm.isAuto">
                  <el-radio :label="0">否</el-radio>
                  <el-radio :label="1">是</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item v-if="screenForm.isAuto == 1" label="轮播时间间隔(秒)" prop="autoplay">
                <el-input v-model="screenForm.autoplay" placeholder="请输入轮播时间间隔" clearable :style="{ width: '50%' }" />
              </el-form-item>

              <el-form-item label="是否允许手动关闭" prop="isClose">
                <el-radio-group v-model="screenForm.isClose">
                  <el-radio v-if="screenForm.duration > 0" :label="0">否</el-radio>
                  <el-radio :label="1">是</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item v-if="screenForm.isClose == 1" label="几秒后可手动关闭" prop="closeDuration">
                <el-input v-model.number="screenForm.closeDuration" placeholder="请输入几秒后可手动关闭" clearable :style="{ width: '50%' }" />
              </el-form-item>
              <!-- <el-form-item label="设置展示规则" prop="showRules">
                <el-radio-group v-model="screenForm.showRules">
                  <el-radio :label="0">会话仅展示一次</el-radio>
                  <el-radio :label="1">每个场景展示一次</el-radio>
                </el-radio-group>
              </el-form-item> -->
            </el-form>
            <el-button
              :loading="loading4ScreenConfig"
              style="display: block; margin: 10px auto"
              type="primary"
              @click="handleComit('screenConfig')"
            >确 定
            </el-button>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <!-- 积分抽奖配置 -->
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            积分抽奖配置
            <el-tag size="mini">{{ form.integralConfigTime ? '上次设置时间：' + form.integralConfigTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <el-form ref="form" :model="integralConfig" label-width="240px" label-position="center" class="form">
              <el-form-item label="是否启用抽奖配置" prop="isValid">
                <el-switch v-model="integralConfig.isStartlottery" />
              </el-form-item>
              <el-form-item label="活动名称" prop="activityName">
                <el-input v-model.trim="integralConfig.activityName" disabled />
              </el-form-item>
              <el-form-item label="活动说明" prop="activityExplain">
                <el-input v-model.trim="integralConfig.activityExplain" disabled />
              </el-form-item>
              <el-form-item label="抽奖状态" prop="drawFormName">
                <el-input v-model.trim="integralConfig.drawFormName" disabled />
              </el-form-item>
              <el-form-item label="类型" prop="statusName">
                <el-input v-model.trim="integralConfig.statusName" disabled />
              </el-form-item>
              <el-form-item label="开始时间" prop="activityStartTime">
                <el-input v-model.trim="integralConfig.activityStartTime" disabled />
              </el-form-item>
              <el-form-item label="结束时间" prop="activityEndTime">
                <el-input v-model.trim="integralConfig.activityEndTime" disabled />
              </el-form-item>
              <div class="integral_btn">
                <el-button class="button-new-tag" @click="dialogIntegralVisibles = !dialogIntegralVisibles">抽奖配置</el-button>
                <el-button
                  :loading="loadingintegralConfig"
                  type="primary"
                  style="margin-left: 10px"
                  @click="handleComit('integralConfig')"
                >确 定
                </el-button>
              </div>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <!-- 课程分类样式设置 -->
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            课程分类样式设置
            <el-tag size="mini">{{ form.classFourTime ? '上次设置时间：' + form.classFourTime : '未设置' }} </el-tag>
          </template>
          <section class="card-inner">
            <div>
              <el-row>
                <el-col :span="6" :offset="4">
                  <el-card :body-style="{ padding: '0px' }">
                    <div class="class_four">
                      <div class="class_four_left">
                        <el-image
                          style="width: 100px; height: 200px"
                          :src="classFourImage[classFourConfig[0]]"
                          fit="cover"
                          :preview-src-list="[classFourImage[classFourConfig[0]]]"
                        />
                      </div>
                      <div class="class_four_right">
                        <h2>视频分类样式</h2>
                        <el-select v-model="classFourConfig[0]" placeholder="请选择">
                          <el-option label="四级分类一" value="0" />
                          <el-option label="四级分类二" value="1" />
                          <el-option label="四级分类三" value="2" />
                          <el-option label="四级分类四" value="3" />
                          <el-option label="三级分类" value="4" />
                        </el-select>
                      </div>
                    </div>
                  </el-card>
                </el-col>
                <el-col :span="6" :offset="4">
                  <el-card :body-style="{ padding: '0px' }">
                    <div class="class_four">
                      <div class="class_four_left">
                        <el-image
                          style="width: 100px; height: 200px"
                          :src="classFourImage[classFourConfig[1]]"
                          fit="cover"
                          :preview-src-list="[classFourImage[classFourConfig[1]]]"
                        />
                      </div>
                      <div class="class_four_right">
                        <h2>音频分类样式</h2>
                        <el-select v-model="classFourConfig[1]" placeholder="请选择">
                          <el-option label="四级分类一" value="0" />
                          <el-option label="四级分类二" value="1" />
                          <el-option label="四级分类三" value="2" />
                          <el-option label="四级分类四" value="3" />
                        </el-select>
                      </div>
                    </div>
                  </el-card>
                </el-col>
              </el-row>
            </div>
            <div class="integral_btn">
              <el-button :loading="loadingclassFourConfig" type="primary" style="margin-left: 10px" @click="handleComit('classFourConfig')">
                确 定
              </el-button>
            </div>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <!-- 答题设置 -->
    <answerSetting />
    <el-dialog
      v-el-drag-dialog
      :visible.sync="visible"
      :destroy-on-close="true"
      :close-on-click-modal="false"
      :show-close="false"
      :title="type == 'menu' ? '快捷入口设置' : type == 'homemenu' ? '首页金刚区设置' : '常用功能设置'"
      center
      width="600px"
    >
      <el-form ref="iform" :model="iform" :rules="rules" label-width="100px" :style="{ height: type == 'used' ? '440px;' : '340px;' }">
        <el-form-item label="名称" prop="name">
          <el-input v-model.trim="iform.name" placeholder="请输入名称" />
        </el-form-item>
        <template v-if="type == 'used'">
          <el-form-item label="简介" prop="text">
            <el-input v-model.trim="iform.text" placeholder="请输入简介" />
          </el-form-item>
          <!-- <el-form-item label="背景颜色" prop="bgcolor">
            <el-color-picker v-model="iform.bgcolor" />
          </el-form-item>-->
        </template>
        <template v-if="type !== 'service' && type !== 'serviceadd' && type !== 'tabBar'">
          <el-form-item label="链接类型" prop="type">
            <el-radio-group v-model="iform.type">
              <el-radio :label="0">无</el-radio>
              <el-radio :label="1">内部链接</el-radio>
              <el-radio :label="2">外部链接</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item v-if="iform.type != 0" label="链接地址" prop="path">
            <el-input v-model.trim="iform.path" placeholder="请输入链接地址" />
          </el-form-item>
          <el-form-item label="图标" prop="icon">
            <!--            homemenu 金刚区
  type == 'serviceicon' ||
                  type == 'serviceiconadd' ||
                  type == 'used' || type=='homemenu'
                  ? iform.icon
                  : iform.icon-->
            <el-image style="width: 40px; height: 40px; vertical-align: middle" :src="iform.icon">
              <div slot="error" class="image-slot">
                <i class="el-icon-picture-outline" />
              </div>
            </el-image>
            <el-button @click="addIconImg('homemenu')">点击更换图标 </el-button>
          </el-form-item>
        </template>
        <template v-if="type === 'tabBar'">
          <el-form-item label="链接类型" prop="type">
            <el-radio-group v-model="iform.type">
              <el-radio :label="0">无</el-radio>
              <el-radio :label="1">内部链接</el-radio>
              <el-radio :label="2">外部链接</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item v-if="iform.type != 0" label="链接地址" prop="path">
            <el-input v-model.trim="iform.path" placeholder="请输入链接地址" />
          </el-form-item>
          <el-form-item label="图标" prop="icon">
            <el-image style="width: 40px; height: 40px; vertical-align: middle" :src="iform.icon">
              <div slot="error" class="image-slot">
                <i class="el-icon-picture-outline" />
              </div>
            </el-image>
            <el-button @click="addIconImg('footer-icon')">点击更换图标 </el-button>
          </el-form-item>
          <el-form-item label="选中图标1" prop="themeOne">
            <el-image style="width: 40px; height: 40px; vertical-align: middle" :src="iform.themeOne">
              <div slot="error" class="image-slot">
                <i class="el-icon-picture-outline" />
              </div>
            </el-image>
            <el-button @click="addIconImg('footer-themeOne')">点击更换图标 </el-button>
            <!--            <el-popover
                            ref="iconvisible1"
                            placement="top"
                            title
                            width="400"
                            trigger="click"
                        >
                          <section
                              style="
                              display: flex;
                              align-items: center;
                              flex-wrap: wrap;
                              min-height: 200px;
                              overflow-y: auto;
                            "
                          >
                            <template>
                              <section
                                  v-for="(item, index) in themeOneIcon"
                                  :key="index"
                                  style="margin: 5px; cursor: pointer"
                                  @click="handleSelectIconThemeOne(item)"
                              >
                                <img style="width: 40px; height: 40px" :src="item.label">
                              </section>
                            </template>
                          </section>
                          <el-button
                              slot="reference"
                              @click="iconvisible1 = !iconvisible1"
                          >点击更换图标
                          </el-button>
                        </el-popover>-->
          </el-form-item>
          <el-form-item label="选中图标2" prop="themeTwo">
            <el-image style="width: 40px; height: 40px; vertical-align: middle" :src="iform.themeTwo">
              <div slot="error" class="image-slot">
                <i class="el-icon-picture-outline" />
              </div>
            </el-image>
            <el-button @click="addIconImg('footer-themeTwo')">点击更换图标 </el-button>
          </el-form-item>
          <el-form-item label="选中图标3" prop="themeThree">
            <el-image style="width: 40px; height: 40px; vertical-align: middle" :src="iform.themeThree">
              <div slot="error" class="image-slot">
                <i class="el-icon-picture-outline" />
              </div>
            </el-image>
            <el-button @click="addIconImg('footer-themeThree')">点击更换图标 </el-button>
          </el-form-item>
        </template>
        <el-form-item v-if="type !== 'homemenu'" label="是否显示" prop="show">
          <el-switch v-model="iform.show" active-text="显示" inactive-text="不显示" />
        </el-form-item>
        <template v-if="type === 'used' || type === 'serviceicon' || type === 'serviceiconadd' || type === 'homemenu' || type === 'tabBar'">
          <el-form-item label="是否需要登录" prop="login">
            <el-switch v-model="iform.login" active-text="需要" inactive-text="不需要" />
          </el-form-item>
        </template>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="default" style="padding: 10px 30px" @click="handleClose()">取 消 </el-button>
        <el-button type="primary" @click="updateData()">确 定</el-button>
      </div>
    </el-dialog>
    <!--输入标签的弹窗-->
    <el-dialog :close-on-click-modal="false" :visible.sync="visible4Label" title="输入标签" width="500" center>
      <el-form @submit.native.prevent>
        <el-form-item label="标签:">
          <el-tag
            v-for="tag in labels"
            :key="tag"
            closable
            :disable-transitions="false"
            style="margin-right: 5px;margin-bottom:5px;"
            @close="handleCloseTag(tag)"
          >{{ tag }}
          </el-tag>
          <div class="tag-input-container">
            <el-input
              ref="tagInput"
              v-model="tagInputValue"
              class="input-new-tag"
              size="small"
              maxlength="10"
              @keyup.enter.native="handleInputConfirm"
              @blur="handleInputConfirm"
            />
            <span class="tip"><i class="el-icon-info" />输入完成后请回车</span>
          </div>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="default" style="padding: 10px 30px" @click="visible4Label = false">取 消 </el-button>
        <el-button type="primary" @click="setCourse4Label()">确 定</el-button>
      </div>
    </el-dialog>
    <!--选择直播/创新工作室的弹窗-->
    <el-dialog :close-on-click-modal="false" custom-class="live-dialog" :visible.sync="visible4Choose" title="选择数据" width="1200px" center>
      <choose-list v-if="visible4Choose" :type="chooseType" @select="handleChoose" />
      <div slot="footer" class="dialog-footer">
        <el-button type="default" style="padding: 10px 30px" @click="visible4Choose = false">取 消 </el-button>
        <el-button type="primary" @click="setChooseData()">确 定</el-button>
      </div>
    </el-dialog>
    <copy-pic-url v-show="showCopy" :is-show="showCopy" @successCBK="showCopy = false" />
    <!--
    开屏图设置上传图片-->

    <image-no-cropper-upload
      v-if="uploadFile.showUpload === 2"
      ref="imageUpload"
      :accept="uploadFile.accept"
      :limit="1"
      :show-chunks="true"
      :multiple="false"
      :is-oss="uploadFile.isOss"
      :chunk-size="uploadFile.chunksize"
      :before-upload="beforeUpload"
      @close="uploadFile.showUpload = -1"
      @success="uploadSuccess"
    >
      <div slot="tip" class="upload-tip">
        <i class="el-icon-info" />
        :
        {{ uploadFile.fileType | filterTip }}
      </div>
    </image-no-cropper-upload>

    <!-- 选择积分抽奖活动 -->
    <el-dialog title="选择抽奖配置" :visible.sync="dialogIntegralVisibles" center fullscreen :close-on-click-modal="false">
      <integralConfig v-if="dialogIntegralVisibles" ref="resetAll" :bigturntable-id="form.bigturntableId" @userData="selectintegralConfig" />
      <div slot="footer" class="dialog-footer">
        <el-button style="padding: 8px 30px" @click="dialogIntegralVisibles = false">取消</el-button>
        <el-button style="padding: 8px 30px" type="primary" @click="insertIntegral()">确定</el-button>
      </div>
    </el-dialog>
  </section>
</template>
<script>
import ImageCropper from '@/components/ImageCropper'
import ImageUpload from '@/components/ImageUpload'
import VDraggable from './../components/draggable'
import VDrag from './../components/drag'
import elDragDialog from '@/directive/el-drag-dialog'
import draggable from 'vuedraggable'
import CourseClassifyTree from '../components/CourseClassifyTree'
import integralConfig from '../components/integralConfig'
import VTabBar from './../components/draggableTabBar'
import ChooseList from '../components/chooseList'
import JsonEditor from '@/components/JsonEditor'
import answerSetting from '../../../competitiveAnswer/answerSetting/pages/index'
import { setDataByType, getEnterpriseInfo, getDataByType, queryNewTypes } from './../api'
import ghhn from './../images/icon-ghhn.png'
import cxxc from './../images/icon-cxxc.png'
import zgfc from './../images/icon-zgfc.png'
import ghry from './../images/icon-ghry.png'
import hyzs from './../images/icon-hyzs.png'
import zgtp from './../images/icon-zgtp.png'
import fczj from './../images/icon-fczj.png'
import flfw from './../images/icon-flfw.png'
import xlyz from './../images/icon-xlyz.png'
import hybf from './../images/icon-hybf.png'
import zdh from './../images/icon-zdh.png'

import servicewdfl from './../images/service/wdfl.png'
import servicehdzx from './../images/service/hdzx.png'
import servicehfsj from './../images/service/hfsj.png'
import serviceghzj from './../images/service/ghzj.png'
import serviceghxw from './../images/service/ghxw.png'
import servicegg from './../images/service/gg.png'
import servicefwrx from './../images/service/fwrx.png'
import servicegaxd from './../images/service/gaxd.png'
import servicezxx from './../images/service/zxx.png'
import serviceghjz from './../images/service/ghjz.png'
import servicexfng from './../images/service/xfng.png'
import servicebmfw from './../images/service/bmfw.png'
import servicejnzq from './../images/service/jnzq.png'
import servicecglb from './../images/service/cglb.png'
import servicezxxx from './../images/service/zxxx.png'
import servicezxks from './../images/service/zxks.png'
import servicezxdt from './../images/service/zxdt.png'
import servicephb from './../images/service/phb.png'
import servicezjhd from './../images/service/zjhd.png'
import servicetphd from './../images/service/tphd.png'
import servicedcwj from './../images/service/dcwj.png'
import serviceghhn from './../images/service/ghhn.png'
import servicezcwj from './../images/service/zcwj.png'
import servicecylj from './../images/service/cylj.png'
import servicetxl from './../images/service/txl.png'
import servicebgzl from './../images/service/bgzl.png'
import servicezzjg from './../images/service/zzjg.png'
import servicehygl from './../images/service/hygl.png'
import serviceghry from './../images/service/ghry.png'
import servicedsj from './../images/service/dsj.png'
import servicecsyy from './../images/service/csyy.png'
import servicezgyy from './../images/service/zgyy.png'
import servicezgfc from './../images/service/zgfc.png'
import servicecxgzs from './../images/service/cxgzs.png'
import servicezgcx from './../images/service/zgcx.png'
import servicezdh from './../images/service/zdh.png'
import servicehyzs from './../images/service/hyzs.png'
import servicejfrw from './../images/service/jfrw.png'
import serviceflsc from './../images/service/flsc.png'
import servicexlyz from './../images/service/xlyz.png'
import servicemmxw from './../images/service/mmxw.png'
import servicebfjz from './../images/service/bfjz.png'
import servicehyww from './../images/service/hyww.png'
import serviceflfw from './../images/service/flfw.png'
import servicehdbm from './../images/service/hdbm.png'
import servicezgsw from './../images/service/zgsw.png'
import servicezgxqxz from './../images/service/zgxqxz.png'
// 新加的
import servicezgfls from './../images/service/zgfls.png'
import servicegwlb from './../images/service/gwlb.png'
import servicezbhd from './../images/service/zbhd.png'
import servicegjsg from './../images/service/gjsg.png'
import serviceghhd from './../images/service/ghhd.png'
import servicexsyzg from './../images/service/xsyzg.png'
import servicewndt from './../images/service/wndt.png'
import servicekcxx from './../images/service/kcxx.png'

import newgdh from './../images/news/newgdh.png'
import newzgfc from './../images/news/newzgfc.png'
import newghxw from './../images/news/newghxw.png'
import newgg from './../images/news/newgg.png'
import newxlyz from './../images/news/newxlyz.png'
import newhwzs from './../images/news/newhwzs.png'
import newbfjz from './../images/news/newbfjz.png'
import newflfw from './../images/news/newflfw.png'
import newzgjk from './../images/news/newzgjk.png'
import newzgsw from './../images/news/newzgsw.png'
import newzzjg from './../images/news/newzzjg.png'
import newghry from './../images/news/newghry.png'
import newdsj from './../images/news/newdsj.png'
import newjnzq from './../images/news/newjnzq.png'
import newcglb from './../images/news/newcglb.png'
import newzxxx from './../images/news/newzxxx.png'
import newzxks from './../images/news/newzxks.png'
import newzxdt from './../images/news/newzxdt.png'
import newphb from './../images/news/newphb.png'
import newbmhd from './../images/news/newbmhd.png'
import newtphd from './../images/news/newtphd.png'
import newdcwj from './../images/news/newdcwj.png'
import newzgjy from './../images/news/newzgjy.png'
import newzjhd from './../images/news/newzjhd.png'
import newxfng from './../images/news/newxfng.png'
import newmmxw from './../images/news/newmmxw.png'
import newaxyz from './../images/news/newaxyz.png'
import newwdfl from './../images/news/newwdfl.png'
import newjfrw from './../images/news/newjfrw.png'
import newsc from './../images/news/newsc.png'
import newfwrx from './../images/news/newfwrx.png'
import newcylj from './../images/news/newcylj.png'
import newcgyy from './../images/news/newcgyy.png'
// import newylhz from './../images/news/newylhz.png'
import newymxd from './../images/news/newymxd.png'
import newzjbl from './../images/news/newzjbl.png'
import newzyfw from './../images/news/newzyfw.png'
// defaultIcon
import activity from './../images/footer/activity-g.png'
import center from './../images/footer/center-g.png'
import inx from './../images/footer/index-g.png'
import servicePng from './../images/footer/service-g.png'
import shopPng from './../images/footer/shop-g.png'
import skillPng from './../images/footer/skill-g.png'
import hdD from './../images/footer/hd-d.png'
import hd1D from './../images/footer/hd1-d.png'
import syD from './../images/footer/sy-d.png'
import sy1D from './../images/footer/sy1-d.png'
import xxD from './../images/footer/xxD.png'
import xx1D from './../images/footer/xx1D.png'
import myD from './../images/footer/myD.png'
import fwD from './../images/footer/fw.png'
import ccD from './../images/footer/ccD.png'
import jnqgxx from './../images/footer/jnqgxx.png'
import jnqgcg from './../images/footer/jnqgcg.png'
import ahIndex from './../images/footer/ahIndex.png'
import ahCourse from './../images/footer/ahCourse.png'
import ahMy from './../images/footer/ahMy.png'
import ahactivity from './../images/footer/ahactivity.png'

// themeOne
import activityOne from './../images/footer/theme-one/activity-a.png'
import centerOne from './../images/footer/theme-one/center-a.png'
import inxOne from './../images/footer/theme-one/index-a.png'
import servicePngOne from './../images/footer/theme-one/service-a.png'
import shopPngOne from './../images/footer/theme-one/shop-a.png'
import skillPngOne from './../images/footer/theme-one/skill-a.png'
import hdOne from './../images/footer/theme-one/hd.png'
import hd1One from './../images/footer/theme-one/hd1.png'
import syOne from './../images/footer/theme-one/sy.png'
import sy1One from './../images/footer/theme-one/sy1.png'
import xxOne from './../images/footer/theme-one/xx.png'
import ccOne from './../images/footer/theme-one/cc.png'
import fw1One from './../images/footer/theme-one/fw1.png'
import my1One from './../images/footer/theme-one/my1.png'
import xx1One from './../images/footer/theme-one/xx1.png'
import jnqgxxOne from './../images/footer/theme-one/jnqgxx.png'
import jnqgcgOne from './../images/footer/theme-one/jnqgcg.png'
import ahIndexOne from './../images/footer/theme-one/ahIndex.png'
import ahCourseOne from './../images/footer/theme-one/ahCourse.png'
import ahMyOne from './../images/footer/theme-one/ahMy.png'
import ahactivityOne from './../images/footer/theme-one/ahactivity.png'

// themeTwo
import activityTwo from './../images/footer/theme-two/activity-a.png'
import centerTwo from './../images/footer/theme-two/center-a.png'
import inxTwo from './../images/footer/theme-two/index-a.png'
import servicePngTwo from './../images/footer/theme-two/service-a.png'
import shopPngTwo from './../images/footer/theme-two/shop-a.png'
import skillPngTwo from './../images/footer/theme-two/skill-a.png'
import hdTwo from './../images/footer/theme-two/hd.png'
import hd1Two from './../images/footer/theme-two/hd1.png'
import syTwo from './../images/footer/theme-two/sy.png'
import sy1Two from './../images/footer/theme-two/sy1.png'
import xxTwo from './../images/footer/theme-two/xx.png'
import ccTwo from './../images/footer/theme-two/cc.png'
import fw1Two from './../images/footer/theme-two/fw1.png'
import my1Two from './../images/footer/theme-two/my1.png'
import xx1Two from './../images/footer/theme-two/xx1.png'
import jnqgxxTwo from './../images/footer/theme-two/jnqgxx.png'
import jnqgcgTwo from './../images/footer/theme-two/jnqgcg.png'
import ahIndexTwo from './../images/footer/theme-two/ahIndex.png'
import ahCourseTwo from './../images/footer/theme-two/ahCourse.png'
import ahMyTwo from './../images/footer/theme-two/ahMy.png'
import ahactivityTwo from './../images/footer/theme-two/ahactivity.png'
// themeThree
import activityThree from './../images/footer/theme-three/activity-a.png'
import centerThree from './../images/footer/theme-three/center-a.png'
import inxThree from './../images/footer/theme-three/index-a.png'
import servicePngThree from './../images/footer/theme-three/service-a.png'
import shopPngThree from './../images/footer/theme-three/shop-a.png'

// 金刚区菜单
import menusaqj from './../images/menus/aqj.png'
import menusdsw from './../images/menus/dsw.png'
import menusdtcg from './../images/menus/dtcg.png'
import menusflh from './../images/menus/flh.png'
import menusjnk from './../images/menus/jnk.png'
import menusshq from './../images/menus/shq.png'
import menusugb from './../images/menus/ugb.png'
import menuszb from './../images/menus/zb.png'
import { exportSign } from '@/utils/fileImportOrExportSign'
import CopyPicUrl from '@/components/upload/copyPicUrl'

import ImageNoCropperUpload from '@/components/ImageNoCropperUpload'
import { getDictByCode } from '@/views/orgbuild/zgfc/api'
import { getRech } from '@/views/activity/redPacket/components/rechargeRecord/api' // base on element-ui
import { intwith } from '@/utils/validate'

export default {
  name: 'ConfigPagestyle',
  components: {
    ImageCropper,
    ImageUpload,
    VDraggable,
    draggable,
    VDrag,
    VTabBar,
    CourseClassifyTree,
    ChooseList,
    JsonEditor,
    answerSetting,
    CopyPicUrl,
    ImageNoCropperUpload,
    integralConfig
  },
  directives: {
    elDragDialog
  },
  filters: {
    filterTip(ft) {
      if (ft === 'image') {
        return '只能上传：1M内的图片文件'
      } else if (ft === 'video') {
        return '只能上传：视频文件'
      } else {
        return '请上传附件'
      }
    }
  },
  data() {
    return {
      classFourImage: [
        'https://bjttsx-yanshi.oss-cn-beijing.aliyuncs.com/1/22/12/07/2212075ed542f2950c4f7ab90e57071fe6e239.png',
        'https://bjttsx-yanshi.oss-cn-beijing.aliyuncs.com/1/22/12/07/22120780fde0ea00de4676a13309630ad4c4ee.png',
        'https://bjttsx-yanshi.oss-cn-beijing.aliyuncs.com/1/22/12/07/2212070c54a2b2f9404c1f87a05e2c1651e020.png',
        'https://bjttsx-yanshi.oss-cn-beijing.aliyuncs.com/1/22/12/07/221207cf8ee32faf9342329f73b8bfc9308063.png',
        'https://bjttsx-yanshi.oss-cn-beijing.aliyuncs.com/0/22/12/20/2212208fcedb6346074b4d9460af186e91cd97.jpeg'
      ],
      classFourConfig: ['0', '0'], // 课程分类样式设置
      integralSelections: {},
      integralConfig: { isStartlottery: false },
      dialogIntegralVisibles: false,
      loadingintegralConfig: false,
      loadingclassFourConfig: false,
      showCopy: false,
      loading4appname: false,
      loading4appfullname: false,
      loading4name: false,
      loading4color: false,
      loading4menu: false,
      loading4homemenu: false,
      loading4used: false,
      loading4service: false,
      loading4news: false,
      loading4floatImg: false,
      loading4words: false,
      loading4menuName: false,
      loadingTitle: false,
      loadingTabBar: false,
      loading4wxshare: false,
      loadingCourseCategory9: false,
      loadingCourseContent: false,
      loading4Live: false,
      loading4otherLink: false,
      loading4pageFooter: false,
      loading4ScreenConfig: false,
      obj: {},
      form: {
        name: '',
        nameTime: '',
        logo: '',
        logoTime: '',
        loginlogo: '',
        loginlogoTime: '',
        loginbg: '',
        loginbgTime: '',
        appnameTime: '',
        appname: '',
        appfullname: '',
        appfullnameTime: '',
        applogo: '',
        applogoTime: '',
        color: '',
        colorTime: '',
        bg: '',
        apphomelogoTime: '',
        menu: '',
        menuTime: '',
        homemenu: '',
        homemenuTime: '',
        used: '',
        usedTime: '',
        service: '',
        serviceTime: '',
        news: '',
        newsTime: '',
        floatImgUpdTime: '', // 浮动图标更新时间
        floatImg: '', // 浮动图标
        linkType: '', // 链接类型
        linkAddress: '', // 链接地址
        floatImgShowTime: [], // 链接地址
        floatImgConfigUpdTime: '', // 浮动图标其他相关配置更新时间
        floatImgConfig: '', // 浮动图标其他相关配置
        wordsTransform: [],
        wordsTransformTime: '',
        menuNameTransform: [],
        menuNameTransformTime: '',
        workerTitle: '', // 职工端的title
        workerTime: '', // 职工端的titlte个修改时间
        tabBarTime: '', // 职工段的tabBar修改时间``
        newTypeTime: '', // 职工端新闻分类修改时间
        liveTime: '', // 职工端首页直播配置修改时间
        workRoomTime: '', // 职工端首页劳模创新工作室修改时间
        wxShareContentTime: '', // 微信内容修改时间
        wxShareTitle: '', // 微信分享标题
        wxShareDesc: '', // 微信分享简介
        wxShareLink: '', // 微信分享地址
        wxShareCover: '', // 微信分享封面
        courseCategory9Time: '', // 课程分类9宫格
        courseCategory9: [], // 课程分类9宫格
        tableData4courseTime: '', // 首页课程展示内容
        tableData4courseContent: [], // 首页课程展示内容
        otherLink: '',
        otherLinkTime: '',
        pageFooter: [],
        pageFooterTime: '',
        screenTime: '' // 开屏页更新时间
      },
      screenImgs: [], // 开屏图片列表
      sceneList: [], // 字典场景列表
      dict: {
        ZDCJTZ: [] // 字典场景列表
      },
      screenForm: {
        // 开屏系统配置
        isValid: false,
        sceneList: [], // 场景列表
        screenImgs: [],
        isAuto: 0, // 是否自动轮播 0: 否 1：是
        autoplay: '', // 设置轮播时间间隔
        duration: '', // 开屏图停留时间
        isClose: 1, // 是否允许手动关闭  0: 否 1：是
        closeDuration: '', // 几秒后可手动关闭
        showRules: 0 // 设置展示规则：0会话仅展示一次、1每个场景展示一次
      },
      screenFormRules: {
        sceneList: [{ type: 'array', required: true, message: '请选择展示位置', trigger: 'change' }],
        duration: [{ required: true, message: '请设置开屏图展示时长', trigger: 'blur' }, { required: true, validator: intwith, trigger: 'blur' }],
        autoplay: [{ required: true, message: '请设置轮播时间间隔', trigger: 'blur' }],
        closeDuration: [{ required: true, message: '请设置几秒后可手动关闭', trigger: 'blur' }]
      },
      uploadFile: {
        viewId: '',
        view: '/API-DOCUMENT/document/file/download?id=',
        imagecropperKey: 0,
        showUpload: -1, // 1视频 2图片 3附件
        accept: '',
        fileType: '',
        fileIndex: 0,
        isOss: sessionStorage.getItem('FILE_SAVE_THIRD_CONFIG') || false,
        uploadType: ''
      },
      courseRules: {
        moduleName: [{ required: true, message: '请输入模块名称', trigger: 'blur' }],
        showId: [{ required: true, message: '请输入展示Id', trigger: 'blur' }],
        num: [{ required: true, message: '请输入展示数量', trigger: 'blur' }],
        jumpUrl: [{ required: true, message: '请输入跳转地址', trigger: 'blur' }],
        port: [{ required: true, message: '请输入接口地址', trigger: 'blur' }]
      },
      upload4wxshare: {
        viewId: '',
        view: '/API-DOCUMENT/document/file/download?id='
      },
      formloading: false,
      upload4logo: {
        // 管理端首页logo
        viewId: 'PAGE_TOP_LOGO',
        uploadaction: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileUploadByName?name=PAGE_TOP_LOGO',
        view: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName',
        default: require('./../images/logo.png'),
        isSign: true,
        signImgSrc: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName' + exportSign({ name: 'PAGE_TOP_LOGO' }).paramStr,
        change: () => {
          this.upload4logo.signImgSrc = this.upload4logo.view + exportSign({ name: this.upload4logo.viewId }).paramStr
          this.$bus.$emit('set-logo')
          this.getSystemData('logo')
        }
      },
      upload4loginlogo: {
        // 管理端登录页logo
        viewId: 'BACKEND_LOGIN_LOGO',
        uploadaction: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileUploadByName?name=BACKEND_LOGIN_LOGO',
        view: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName',
        default: require('./../images/login-logo.png'),
        isSign: true,
        signImgSrc: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName' + exportSign({ name: 'BACKEND_LOGIN_LOGO' }).paramStr,
        change: () => {
          this.upload4loginlogo.signImgSrc = this.upload4loginlogo.view + exportSign({ name: this.upload4loginlogo.viewId }).paramStr
          this.getSystemData('loginlogo')
        }
      },
      upload4loginbg: {
        // 管理端登录页背景图
        viewId: 'BACKEND_BACKGROUND_IMG',
        uploadaction: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileUploadByName?name=BACKEND_BACKGROUND_IMG',
        view: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName',
        default: require('./../images/login-bg.png'),
        isSign: true,
        signImgSrc: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName' + exportSign({ name: 'BACKEND_BACKGROUND_IMG' }).paramStr,
        change: () => {
          this.upload4loginbg.signImgSrc = this.upload4loginbg.view + exportSign({ name: this.upload4loginbg.viewId }).paramStr
          this.getSystemData('loginbg')
        }
      },
      upload4apploginlogo: {
        // 客户端登录页logo
        viewId: 'APP_LOGIN_LOGO',
        uploadaction: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileUploadByName?name=APP_LOGIN_LOGO',
        view: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName',
        default: require('./../images/app-login-logo.png'),
        isSign: true,
        signImgSrc: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName' + exportSign({ name: 'APP_LOGIN_LOGO' }).paramStr,
        change: () => {
          this.upload4apploginlogo.signImgSrc = this.upload4apploginlogo.view + exportSign({ name: this.upload4apploginlogo.viewId }).paramStr
          this.getSystemData('applogo')
        }
      },
      upload4applogo: {
        // 客户端首页logo
        viewId: 'APP_HOME_LOGO',
        uploadaction: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileUploadByName?name=APP_HOME_LOGO',
        view: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName',
        default: require('./../images/app-logo.png'),
        isSign: true,
        signImgSrc: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName' + exportSign({ name: 'APP_HOME_LOGO' }).paramStr,
        change: () => {
          this.upload4applogo.signImgSrc = this.upload4applogo.view + exportSign({ name: this.upload4applogo.viewId }).paramStr
          this.getSystemData('apphomelogo')
        }
      },
      upload4appfloatImg: {
        // 客户端 浮动图标
        viewId: 'APP_FLOAT_IMG',
        uploadaction: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileUploadByName?name=APP_FLOAT_IMG',
        view: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName',
        // default: require('./../images/app-logo.png'),
        isSign: true,
        signImgSrc: '/API-ENTERPRISE-BACKEND/backend/sys/sysConfig/fileDownloadByName' + exportSign({ name: 'APP_FLOAT_IMG' }).paramStr,
        change: () => {
          this.upload4appfloatImg.signImgSrc = this.upload4appfloatImg.view + exportSign({ name: this.upload4appfloatImg.viewId }).paramStr
          this.getSystemData('floatImg')
        }
      },
      color: [
        {
          name: 'theme-one',
          color: '#EB523C'
        },
        {
          name: 'theme-two',
          color: '#065AE5'
        },
        {
          name: 'theme-three',
          color: '#12AE92'
        }
      ],
      group: 'mission',
      homemenu: [
        {
          id: 1,
          name: '课程学习',
          type: 1,
          path: '/studyList',
          icon: 'kcxx',
          login: true,
          show: true
        },
        {
          id: 2,
          name: '岗位练兵',
          type: 1,
          path: '/rush/index',
          icon: 'gwlb',
          login: true,
          show: true
        },
        {
          id: 3,
          name: '直播活动',
          type: 1,
          path: '/live',
          icon: 'zbhd',
          login: true,
          show: true
        },
        {
          id: 4,
          name: '工匠书馆',
          type: 2,
          path: 'https://www.baidu.com',
          icon: 'gjsg',
          login: false,
          show: true
        },
        {
          id: 5,
          name: '工会活动',
          type: 1,
          path: '/special/index',
          icon: 'ghhd',
          login: false,
          show: true
        },
        {
          id: 6,
          name: '线上云展馆',
          type: 2,
          path: 'https://www.baidu.com',
          icon: 'xsyzg',
          login: false,
          show: true
        },
        {
          id: 7,
          name: '温暖电台',
          type: 2,
          path: 'https://www.baidu.com',
          icon: 'wndt',
          login: false,
          show: true
        },
        {
          id: 8,
          name: '中工福利社',
          type: 2,
          path: 'https://www.baidu.com',
          icon: 'zgfls',
          login: false,
          show: true
        }
      ],
      listone: [
        {
          id: 1,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        },
        {
          id: 2,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        },
        {
          id: 3,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        },
        {
          id: 4,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        },
        {
          id: 5,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: 'hyzs',
          show: true
        },
        {
          id: 6,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        },
        {
          id: 7,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        },
        {
          id: 8,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        },
        {
          id: 9,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        },
        {
          id: 10,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        }
      ],
      listtwo: [
        {
          id: 1,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        },
        {
          id: 2,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: true
        },
        {
          id: 3,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 4,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 5,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 6,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 7,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 8,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 9,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 10,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        }
      ],
      listthree: [
        {
          id: 1,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 2,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 3,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 4,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 5,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 6,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 7,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 8,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 9,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        },
        {
          id: 10,
          name: '占位菜单',
          type: 1,
          path: '',
          icon: '',
          show: false
        }
      ],
      tabBarList: [
        {
          icon: 'inx',
          id: 1,
          login: false,
          name: '首页',
          path: '/index',
          show: true,
          themeOne: 'inxOne',
          themeThree: 'inxThree',
          themeTwo: 'inxTwo',
          type: 1
        },
        {
          icon: 'servicePng',
          id: 1,
          login: false,
          name: '服务',
          path: '/service',
          show: true,
          themeOne: 'servicePngOne',
          themeThree: 'servicePngThree',
          themeTwo: 'servicePngTwo',
          type: 1
        },
        {
          icon: 'shopPng',
          id: 1,
          login: true,
          name: '商城',
          path: 'mall',
          show: true,
          themeOne: 'shopPngOne',
          themeThree: 'shopPngThree',
          themeTwo: 'shopPngTwo',
          type: 2
        },
        {
          icon: 'center',
          id: 1,
          login: true,
          name: '我的',
          path: '/center',
          show: true,
          themeOne: 'centerOne',
          themeThree: 'centerThree',
          themeTwo: 'centerTwo',
          type: 2
        }
      ],
      visible: false,
      iform: {
        id: '',
        name: '',
        text: '',
        type: 1,
        path: '',
        icon: '',
        show: false,
        bgcolor: '',
        login: false,
        themeOne: '',
        themeTwo: '',
        themeThree: ''
      },
      rules: {
        name: [
          {
            required: true,
            message: '请输入名称',
            trigger: 'blur'
          }
        ],
        text: [
          {
            required: true,
            message: '请输入简介',
            trigger: 'blur'
          }
        ],
        type: [
          {
            required: true,
            message: '请选择链接类型',
            trigger: 'blur'
          }
        ],
        path: [
          {
            required: true,
            message: '请输入链接地址',
            trigger: 'blur'
          }
        ],
        icon: [
          {
            required: true,
            message: '请选择图标',
            trigger: 'blur'
          }
        ],
        show: [
          {
            required: true,
            message: '请选择是否显示',
            trigger: 'blur'
          }
        ],
        bgcolor: [
          {
            required: true,
            message: '请选择背景颜色',
            trigger: 'blur'
          }
        ],
        themeOne: [
          {
            required: true,
            message: '请选择选中图标1',
            trigger: 'blur'
          }
        ],
        themeTwo: [
          {
            required: true,
            message: '请选择选中图标2',
            trigger: 'blur'
          }
        ],
        themeThree: [
          {
            required: true,
            message: '请选择选中图标3',
            trigger: 'blur'
          }
        ]
      },
      iconvisible: false,
      number: 1,
      listusedone: [
        {
          id: 1,
          name: '积分任务',
          text: '做任务得积分',
          type: 1,
          path: '',
          icon: 'servicejfrw',
          show: false,
          bgcolor: '#FFF5ED',
          login: false
        },
        {
          id: 2,
          name: '技能专区',
          text: '提升知识技能',
          type: 1,
          path: '',
          icon: 'servicejnzq',
          show: false,
          bgcolor: '#F2FEE6',
          login: false
        },
        {
          id: 3,
          name: '常用链接',
          text: '使用方便快捷',
          type: 1,
          path: '',
          icon: 'servicecylj',
          show: false,
          bgcolor: '#EDF6FF',
          login: false
        }
      ],
      listusedtwo: [
        {
          id: 1,
          name: '创新工作室',
          text: '为创新增添动力',
          type: 1,
          path: '',
          icon: 'servicecxgzs',
          show: false,
          bgcolor: '#FFEDED',
          login: false
        },
        {
          id: 2,
          name: '法律咨询',
          text: '维护合法权益',
          type: 1,
          path: '',
          icon: 'serviceflfw',
          show: false,
          bgcolor: '#EDF6FF',
          login: false
        },
        {
          id: 3,
          name: '心灵驿站',
          text: '疏导心理健康',
          type: 1,
          path: '',
          icon: 'servicexlyz',
          show: false,
          bgcolor: '#FFF4E1',
          login: false
        }
      ],
      type: 'menu',
      listservice: [
        {
          id: 1,
          name: '工会动态',
          show: true,
          list: [
            {
              id: 1,
              name: '工会新闻',
              icon: 'serviceghxw',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 2,
              name: '公告',
              icon: 'servicegg',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        },
        {
          id: 2,
          show: true,
          name: '基础服务',
          list: [
            {
              id: 1,
              name: '服务热线',
              icon: 'servicefwrx',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 2,
              name: '关爱行动',
              icon: 'servicegaxd',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 3,
              name: '主席信箱',
              icon: 'servicezxx',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 4,
              name: '工会矩阵',
              icon: 'serviceghjz',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 5,
              name: '幸福女工',
              icon: 'servicexfng',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 6,
              name: '便民服务',
              icon: 'servicebmfw',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        },
        {
          id: 3,
          show: true,
          name: '技能提升',
          list: [
            {
              id: 1,
              name: '技能专区',
              icon: 'servicejnzq',
              type: 0,
              path: '',
              show: true,
              login: true
            },
            {
              id: 2,
              name: '闯关练兵',
              icon: 'servicecglb',
              type: 1,
              path: '/skill/rush/index',
              show: true,
              login: true
            },
            {
              id: 3,
              name: '在线学习',
              icon: 'servicezxxx',
              type: 1,
              path: '/skill/course/index',
              show: true,
              login: true
            },
            {
              id: 4,
              name: '在线考试',
              icon: 'servicezxks',
              type: 0,
              path: '',
              show: true,
              login: true
            },
            {
              id: 5,
              name: '专项答题',
              icon: 'servicezxdt',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 6,
              name: '排行榜',
              icon: 'servicephb',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        },
        {
          id: 4,
          show: true,
          name: '活动中心',
          list: [
            {
              id: 1,
              name: '征集活动',
              icon: 'servicezjhd',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 2,
              name: '投票活动',
              icon: 'servicetphd',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 3,
              name: '调查问卷',
              icon: 'servicedcwj',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 4,
              name: '工会红娘',
              icon: 'serviceghhn',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        },
        {
          id: 5,
          show: true,
          name: '日常办公',
          list: [
            {
              id: 1,
              name: '政策文件',
              icon: 'servicezcwj',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 2,
              name: '常用链接',
              icon: 'servicecylj',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 3,
              name: '通讯录',
              icon: 'servicetxl',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 4,
              name: '办公资料',
              icon: 'servicebgzl',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        },
        {
          id: 6,
          show: true,
          name: '组织建设',
          list: [
            {
              id: 1,
              name: '组织架构',
              icon: 'servicezzjg',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 2,
              name: '会员管理',
              icon: 'servicehygl',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 3,
              name: '工会荣誉',
              icon: 'serviceghry',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 4,
              name: '大事记',
              icon: 'servicedsj',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        },
        {
          id: 7,
          show: true,
          name: '职工文化',
          list: [
            {
              id: 1,
              name: '场馆预约',
              icon: 'servicecsyy',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 2,
              name: '职工艺苑',
              icon: 'servicezgyy',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 3,
              name: '职工风采',
              icon: 'servicezgfc',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        },
        {
          id: 8,
          show: true,
          name: '创新中心',
          list: [
            {
              id: 1,
              name: '创新工作室',
              icon: 'servicecxgzs',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 2,
              name: '职工创新',
              icon: 'servicezgcx',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        },
        {
          id: 9,
          show: true,
          name: '会议中心',
          list: [
            {
              id: 1,
              name: '职代会',
              icon: 'servicezdh',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 2,
              name: '会务助手',
              icon: 'servicehyzs',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        },
        {
          id: 10,
          show: true,
          name: '职工普惠',
          list: [
            {
              id: 1,
              name: '积分任务',
              icon: 'servicejfrw',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 2,
              name: '商城',
              icon: 'serviceflsc',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        },
        {
          id: 11,
          show: true,
          name: '职工关爱',
          list: [
            {
              id: 1,
              name: '心灵驿站',
              icon: 'servicexlyz',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 2,
              name: '妈咪小屋',
              icon: 'servicemmxw',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 3,
              name: '帮扶救助',
              icon: 'servicebfjz',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 4,
              name: '会员慰问',
              icon: 'servicehyww',
              type: 0,
              path: '',
              show: true,
              login: false
            },
            {
              id: 5,
              name: '法律咨询',
              icon: 'serviceflfw',
              type: 0,
              path: '',
              show: true,
              login: false
            }
          ]
        }
      ],
      si: '',
      listnews: [
        {
          id: 1,
          code: 'default',
          name: 'default',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 2,
          code: 'xw',
          name: '新闻',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 3,
          code: 'zgfc',
          name: '职工风采',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 4,
          code: 'cxgzs',
          name: '创新工作室',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 5,
          code: 'fwrx',
          name: '服务热线',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 6,
          code: 'ghry',
          name: '工会荣誉',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 7,
          code: 'dsj',
          name: '大事记',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 8,
          code: 'zzjg',
          name: '组织架构',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 9,
          code: 'mmxw',
          name: '妈咪小屋',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 10,
          code: 'xlyz',
          name: '心灵驿站',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 11,
          code: 'flyz',
          name: '法律援助',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 12,
          code: 'hfjn',
          name: '会费收缴',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 13,
          code: 'hybf',
          name: '会员帮扶',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 14,
          code: 'hyww',
          name: '会员慰问',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 15,
          code: 'xfng',
          name: '幸福女工',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 16,
          code: 'hwzs',
          name: '会务助手',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 17,
          code: 'cgyy',
          name: '场馆预约',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 18,
          code: 'zdh',
          name: '职代会',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 19,
          code: 'zdh',
          name: '职工健康',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        },
        {
          id: 20,
          code: 'ghhn',
          name: '工会红娘',
          view: 0,
          rate: 0,
          like: 0,
          comment: 0
        }
      ],
      iconvisible1: false,
      iconvisible2: false,
      iconvisible3: false,
      tableData: [],
      newTypeMap: {},
      loadingNewType: false,
      addCourseOrigin: '', // saas || company
      visible4coursetree: false,
      visible4coursetree9: false,
      visible4Label: false,
      loading4workRoom: false,
      tagInputValue: '',
      labels: [],
      liveData: [], // 展示的直播数据
      visible4Choose: false,
      chooseLiveList: [], // 选择的直播数据
      workRoom: [],
      chooseType: ''
    }
  },
  created() {
    this.getSystemData('name')
    this.getSystemData('color')
    this.getSystemData('logo')
    this.getSystemData('loginlogo')
    this.getSystemData('loginbg')
    // this.getSystemData('appfullname')  //职工端系统名称
    this.getSystemData('appname')
    // this.getSystemData('applogo')
    this.getSystemData('apphomelogo')
    // this.getSystemData('homemenu')
    // this.getSystemData('menu') //首页快捷入口设置
    // this.getSystemData('used') //常用功能设置
    // this.getSystemData('service') //手机端服务设置 service
    this.getSystemData('news')
    // this.getSystemData('floatImg') //浮动图标
    // this.getSystemData('floatImgConfig')  //浮动图标相关设置
    // this.getSystemData('wordsTransform') //敏感词转义
    // this.getSystemData('menuNameTransform')  //菜单转义
    this.getSystemData('tabBar')
    this.getSystemData('workerTitle')
    this.getSystemData('wxShareContent')
    // this.getSystemData('courseCategory9') //九宫格
    // this.getSystemData('courseContent')
    // this.getSystemData('live') //直播
    // this.getSystemData('workRoom') //
    // this.getSystemData('otherLink')
    this.getSystemData('pageFooter')
    this.getSystemData('screenConfig')
    this.getSystemData('screenConfig')
    this.getSystemData('integralConfig')
    this.getSystemData('classFourConfig')
    // this.queryNewTypes().then(() => {
    //   this.getSystemData('newType')
    // }) //职工端新闻分类配置
    this.getData()
    for (const i in this.dict) {
      this.getDict(i)
    }
  },
  methods: {
    // 选择积分配置
    selectintegralConfig(val) {
      this.integralSelections = Object.assign({}, val)
    },
    insertIntegral() {
      this.integralConfig = Object.assign({ isStartlottery: true }, { ...this.integralSelections })
      this.dialogIntegralVisibles = false
    },
    addPageFooter() {
      this.form.pageFooter.push({ value: '' })
    },
    handleChoose(arr) {
      this.chooseLiveList = arr
    },
    setChooseData() {
      const msg = this.chooseType === 'live' ? '直播' : '创新工作室'
      if (this.chooseLiveList.length === 0) {
        this.$message.error(`请选择${msg}`)
        return
      }
      console.log('workRoom', this.workRoom)
      const data = this.chooseType === 'live' ? this.liveData : this.workRoom
      const ids = data.map((a) => {
        return a.id
      })
      for (let i = 0; i < this.chooseLiveList.length; i++) {
        const item = this.chooseLiveList[i]
        const name = this.chooseType === 'live' ? item.liveName : item.mainTitle
        if (ids.indexOf(item.id) > -1) {
          this.$message.error(`${msg}：[${name}]已经选过了`)
          return
        }
        if (this.chooseType === 'live') {
          this.liveData.push({
            id: item.id,
            name: item.liveName,
            type: '1' // 1系统内2系统外
          })
        } else {
          this.workRoom.push({ id: item.id, name: item.mainTitle })
        }
      }
      this.visible4Choose = false
    },
    getType(row) {
      const origin = row.origin === 'saas' ? '平台' : '本单位'
      const type = row.type === '1' ? '分类' : '标签'
      return origin + type
    },
    getTypeValue(row) {
      return row.type === '1' ? row.className : row.typeValue
    },
    starAdd(obj) {
      if (obj.columnIndex !== 1 && obj.columnIndex !== 2 && obj.columnIndex !== 5 && obj.columnIndex !== 6 && obj.columnIndex !== 7) {
        return 'star'
      }
    },
    setCourseCategory(arr) {
      arr.forEach((item) => {
        if (this.form.tableData4courseContent.findIndex((ite) => ite.id === item.id) === -1) {
          this.form.tableData4courseContent.push({
            moduleName: item.classifyName,
            type: '1',
            typeValue: item.id,
            className: item.classifyName,
            showId: '',
            num: '',
            jumpUrl: '',
            port: '',
            origin: this.addCourseOrigin
          })
        }
      })
      this.visible4coursetree = false
    },
    /**
     * 确认标签输入框内容
     */
    handleInputConfirm() {
      const inputValue = this.tagInputValue.trim().replace(/,|，/g, '')
      if (inputValue) {
        this.labels.push(inputValue)
      }
      this.tagInputValue = ''
    },
    /**
     * 删除标签
     */
    handleCloseTag(tag) {
      this.labels.splice(this.labels.indexOf(tag), 1)
    },
    setCourse4Label(item) {
      if (this.labels.length === 0) {
        this.$message.error('请先添加标签')
        return
      }
      this.form.tableData4courseContent.push({
        moduleName: '',
        type: '2',
        typeValue: this.labels.join(','),
        showId: '',
        num: '',
        jumpUrl: '',
        port: '',
        origin: this.addCourseOrigin
      })
      this.labels = []
      this.tagInputValue = ''
      this.visible4Label = false
    },
    handleDeleteIndexCourse(info) {
      this.form.tableData4courseContent.splice(info.$index, 1)
    },
    handleDeleteIndex4Type(item, type) {
      if (type === 'live') {
        this.liveData.splice(item.$index, 1)
      } else {
        this.workRoom.splice(item.$index, 1)
      }
    },
    setCourseCategory9(arr) {
      this.form.courseCategory9 = [...this.form.courseCategory9, ...arr]
      this.visible4coursetree9 = false
    },
    handleMenuNameAdd() {
      this.form.menuNameTransform.push({ code: '', name: '' })
    },
    delMenuNameItem(index, item) {
      if (item.code === '' && item.name === '') {
        this.form.menuNameTransform.splice(index, 1)
        return
      }
      this.$confirm('确认删除吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.form.menuNameTransform.splice(index, 1)
          this.$message({
            type: 'success',
            message: '删除成功!'
          })
        })
        .catch(() => {})
    },
    handleWordsAdd() {
      this.form.wordsTransform.push({ code: '', name: '' })
    },
    delWordsItem(index, item) {
      if (item.code === '' && item.name === '') {
        this.form.wordsTransform.splice(index, 1)
        return
      }
      this.$confirm('确认删除吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.form.wordsTransform.splice(index, 1)
          this.$message({
            type: 'success',
            message: '删除成功!'
          })
        })
        .catch(() => {})
    },
    handleNewsDelete(scope) {
      this.listnews.splice(scope.$index, 1)
      this.$message({
        message: '已删除',
        type: 'success',
        duration: 2000
      })
    },

    handleNewsAdd() {
      this.listnews.push({
        id: this.listnews.length + 1,
        code: '',
        name: '',
        view: 0,
        rate: 0,
        like: 0,
        comment: 0,
        login: false
      })
    },

    handleCodeBlur(event, { id }) {
      const v = event.target.value
      if (v) {
        const t = this.listnews.find((a) => a.code === v && a.id !== id)
        if (t) {
          event.target.value = ''
          this.$message({
            message: '模块代码已存在',
            type: 'warning',
            duration: 2000
          })
        }
      }
    },

    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
      if (rowIndex === 0) {
        if (columnIndex === 0) {
          return [1, 2]
        } else if (columnIndex === 1) {
          return [0, 0]
        }
      }
    },

    handleSelectColor(item) {
      this.form.color = item
    },

    handleSelectIcon(item) {
      this.iform.icon = item.value
      if (this.type === 'used') {
        this.iform.bgcolor = item.color
      }
      this.iconvisible = false
    },
    handleEdit(data) {
      const { n, r, t } = data
      this.iform = Object.assign(this.iform, r)
      this.number = n
      this.type = t || 'menu'
      this.visible = true
    },
    addInlet() {
      for (let i = 0; i < this.homemenu.length; i++) {
        this.$set(this.homemenu, i, Object.assign(this.homemenu[i], { id: i }))
      }
      this.homemenu.push({
        id: this.homemenu.length,
        name: '',
        type: 1,
        path: '',
        icon: '',
        login: false,
        show: true
      })
    },
    deleteInlet(data) {
      const { n, r, t, i } = data
      this.homemenu.splice(i, 1)
    },

    handleUsedEdit(data) {
      const { n, r } = data
      this.iform = Object.assign(this.iform, r)
      this.number = n
      this.type = 'used'
      this.visible = true
    },

    handleServiceEdit(data) {
      const { n, r } = data
      this.iform = Object.assign(this.iform, r)
      this.number = n
      this.type = 'service'
      this.visible = true
    },

    handleServiceAdd(data) {
      const { n } = data
      this.iform = {
        id: '',
        name: '',
        text: '',
        type: 0,
        path: '',
        icon: '',
        show: true,
        bgcolor: '',
        login: false
      }
      this.number = n
      this.type = 'serviceadd'
      this.visible = true
    },

    handleServiceRemove(data) {
      const { i } = data
      this.listservice.splice(i, 1)
    },

    handleServiceIconEdit(data) {
      const { n, r, i } = data
      this.iform = Object.assign(this.iform, r)
      this.si = i
      this.number = n
      this.type = 'serviceicon'
      this.visible = true
    },

    handleServiceIconRemove(data) {
      const { t, i } = data
      this.listservice[t].list.splice(i, 1)
    },

    handleServiceIconAdd(data) {
      const { n, i } = data
      this.iform = {
        id: '',
        name: '',
        text: '',
        type: 0,
        path: '',
        icon: '',
        show: true,
        bgcolor: '',
        login: false,
        themeOne: '',
        themeTwo: '',
        themeThree: ''
      }
      this.si = i
      this.number = n
      this.type = 'serviceiconadd'
      this.visible = true
    },

    updateData() {
      this.$refs['iform'].validate((valid) => {
        if (valid) {
          if (this.si === -1) {
            const obj = Object.assign({}, this.iform)
            this.tabBarList.push(obj)
            this.si = ''
            this.visible = false
            return
          }
          if (this.number === 1 || this.number === '1') {
            this.listone.forEach((item) => {
              if (item.id === this.iform.id) {
                item.name = this.iform.name
                item.type = this.iform.type

                item.path = this.iform.path
                item.icon = this.iform.icon
                item.show = this.iform.show
              }
              return
            })
          } else if (this.number === 2 || this.number === '2') {
            this.listtwo.forEach((item) => {
              if (item.id === this.iform.id) {
                item.name = this.iform.name
                item.type = this.iform.type
                item.path = this.iform.path
                item.icon = this.iform.icon
                item.show = this.iform.show
              }
              return
            })
          } else if (this.number === 3 || this.number === '3') {
            this.listthree.forEach((item) => {
              if (item.id === this.iform.id) {
                item.name = this.iform.name
                item.type = this.iform.type
                item.path = this.iform.path
                item.icon = this.iform.icon
                item.show = this.iform.show
              }
              return
            })
          } else if (this.number === 4 || this.number === '4') {
            this.listusedone.forEach((item) => {
              if (item.id === this.iform.id) {
                item.name = this.iform.name
                item.text = this.iform.text
                item.type = this.iform.type
                item.path = this.iform.path
                item.icon = this.iform.icon
                item.show = this.iform.show
                item.bgcolor = this.iform.bgcolor
                item.login = this.iform.login
              }
              return
            })
          } else if (this.number === 5 || this.number === '5') {
            this.listusedtwo.forEach((item) => {
              if (item.id === this.iform.id) {
                item.name = this.iform.name
                item.text = this.iform.text
                item.type = this.iform.type
                item.path = this.iform.path
                item.icon = this.iform.icon
                item.show = this.iform.show
                item.bgcolor = this.iform.bgcolor
                item.login = this.iform.login
              }
              return
            })
          } else if (this.number === 7 || this.number === '7') {
            console.log('iform', this.iform)
            this.homemenu.forEach((item) => {
              if (item.id === this.iform.id) {
                item.name = this.iform.name
                item.type = this.iform.type
                item.path = this.iform.path
                item.icon = this.iform.icon
                item.show = this.iform.show
                item.login = this.iform.login
              }
              return
            })
          } else if (this.number === 6 || this.number === '6') {
            if (this.type === 'service') {
              this.listservice.forEach((item) => {
                if (item.id === this.iform.id) {
                  item.name = this.iform.name
                  item.show = this.iform.show
                }
                return
              })
            } else if (this.type === 'serviceadd') {
              this.listservice.push({
                id: this.listservice.length + 1,
                name: this.iform.name,
                show: this.iform.show,
                list: []
              })
            } else if (this.type === 'serviceicon') {
              this.listservice[this.si].list.forEach((item) => {
                if (item.id === this.iform.id) {
                  item.name = this.iform.name
                  item.type = this.iform.type
                  item.text = this.iform.type
                  item.path = this.iform.path
                  item.icon = this.iform.icon
                  item.show = this.iform.show
                  item.login = this.iform.login
                }
                return
              })
            } else if (this.type === 'serviceiconadd') {
              this.listservice.forEach((item, index) => {
                if (index === this.si) {
                  const obj = {
                    id: item.list.length + 1,
                    name: this.iform.name,
                    text: this.iform.type,
                    path: this.iform.path,
                    icon: this.iform.icon,
                    show: this.iform.show,
                    login: this.iform.login
                  }
                  item.list.push(obj)
                }
                return
              })
            }
          } else if (this.type === 'tabBar') {
            this.tabBarList.splice(this.si, 1, this.iform)
            this.visible = false
          }
          this.visible = false
        } else {
          return false
        }
      })
    },

    handleComit(type) {
      if (type === 'menu') {
        const list = [
          {
            page: 1,
            list: this.listone
          },
          {
            page: 2,
            list: this.listtwo
          },
          {
            page: 3,
            list: this.listthree
          }
        ]
        this.form.menu = JSON.stringify(list)
      }
      if (type === 'homemenu') {
        this.form.homemenu = JSON.stringify(this.homemenu)
      }
      if (type === 'used') {
        const list = [
          {
            page: 1,
            list: this.listusedone
          },
          {
            page: 2,
            list: this.listusedtwo
          }
        ]
        this.form.used = JSON.stringify(list)
      }

      if (type === 'service') {
        this.form.service = JSON.stringify(this.listservice)
      }

      if (type === 'news') {
        this.form.news = JSON.stringify(this.listnews)
      }

      if (type === 'floatImgConfig') {
        // const params = Object.assign({}, this.form)
        const params = {
          linkType: this.form.linkType, // 链接类型
          linkAddress: this.form.linkAddress, // 链接地址
          startDatetime: this.form.floatImgShowTime && this.form.floatImgShowTime.length > 0 ? this.form.floatImgShowTime[0] : '',
          endDatetime: this.form.floatImgShowTime && this.form.floatImgShowTime.length > 0 ? this.form.floatImgShowTime[1] : ''
        }
        this.form.floatImgConfig = JSON.stringify(params)
      }
      let name = ''
      let value = ''
      let isError = false
      switch (type) {
        case 'wxShareContent':
          if (!this.form.wxShareTitle) {
            this.$message({
              type: 'info',
              message: '请输入微信分享标题！'
            })
            return
          }
          if (!this.form.wxShareDesc) {
            this.$message({
              type: 'info',
              message: '请输入微信分享简介！'
            })
            return
          }
          if (!this.form.wxShareLink) {
            this.$message({
              type: 'info',
              message: '请输入微信分享链接！'
            })
            return
          }
          if (!this.form.wxShareCover) {
            this.$message({
              type: 'info',
              message: '请上传微信分享封面！'
            })
            return
          }
          const obj = {
            wxShareTitle: this.form.wxShareTitle,
            wxShareDesc: this.form.wxShareDesc,
            wxShareLink: this.form.wxShareLink,
            wxShareCover: this.form.wxShareCover
          }
          name = 'APP_WECHAT_SHARE_CONTENT'
          value = JSON.stringify(obj)
          this.loading4wxshare = true
          break
        case 'name':
          if (!this.form.name) {
            this.$message({
              type: 'info',
              message: '请输入系统名称！'
            })
            return
          }
          name = 'PAGE_TOP_TITLE'
          value = this.form.name
          this.loading4name = true
          break
        case 'appname':
          if (!this.form.appname) {
            this.$message({
              type: 'info',
              message: '请输入职工端系统简写名称！'
            })
            return
          }
          name = 'APP_SYS_NAME'
          value = this.form.appname
          this.loading4appname = true
          break
        case 'appfullname':
          if (!this.form.appfullname) {
            this.$message({
              type: 'info',
              message: '请输入职工端系统名称！'
            })
            return
          }
          name = 'APP_SYS_NAME_ALL'
          value = this.form.appfullname
          this.loading4appfullname = true
          break
        case 'color':
          if (!this.form.color) {
            this.$message({
              type: 'info',
              message: '请选择主题色！'
            })
            return
          }
          name = 'THEME_COLOR'
          value = this.form.color
          this.loading4color = true
          break
        case 'menu':
          name = 'APP_HOME'
          value = this.form.menu
          this.loading4menu = true
          break
        case 'homemenu':
          name = 'APP_HOME_MENU'
          value = this.form.homemenu
          this.loading4homemenu = true
          break
        case 'used':
          name = 'APP_USED'
          value = this.form.used
          this.loading4used = true
          break
        case 'service':
          name = 'APP_SERVICE'
          value = this.form.service
          this.loading4service = true
          break
        case 'news':
          name = 'APP_NEWS'
          value = this.form.news
          this.loading4news = true
          break
        case 'floatImgConfig':
          name = 'APP_FLOAT_IMG_CONFIG'
          value = this.form.floatImgConfig
          this.loading4floatImg = true
          break
        case 'wordsTransform':
          name = 'WORDS_TRANSFORM'
          value = JSON.stringify(this.form.wordsTransform)
          this.loading4words = true
          break
        case 'menuNameTransform':
          name = 'MENU_TRANSFORM'
          value = JSON.stringify(this.form.menuNameTransform)
          this.loading4menuName = true
          break
        case 'workerTitle':
          if (!this.form.workerTitle) {
            this.$message({
              type: 'info',
              message: '请输入职工端浏览器标题'
            })
            return
          }
          name = 'BROWSER_TITLE_CONFIG'
          value = this.form.workerTitle
          this.loadingTitle = true
          break
        case 'tabBar':
          name = 'BROWSER_UNDER_NAVIGATION'
          value = JSON.stringify(this.tabBarList)
          this.loadingTabBar = true
          break
        case 'newType':
          name = 'APP_NEW_CLASSIFY_NAME'
          value = JSON.stringify(this.formattingTableData(this.tableData))
          this.loadingNewType = true
          break
        case 'courseCategory9':
          name = 'APP_COURSE_CATEGORY_9'
          value = JSON.stringify(this.form.courseCategory9)
          this.loadingCourseCategory9 = true
          break
        case 'courseContent':
          this.$refs.courseForm.validate((valid) => {
            if (valid) {
              name = 'APP_COURSE_CONTENT'
              value = JSON.stringify(this.form.tableData4courseContent)
              this.loadingCourseContent = true
            } else {
              isError = true
            }
          })
          break
        case 'live':
          name = 'APP_LIVE_BOOK_CONTENT'
          value = JSON.stringify(this.liveData)
          this.loading4Live = true
          break
        case 'workRoom':
          name = 'APP_WORKER_STUDIO_CONTENT'
          value = JSON.stringify(this.workRoom)
          this.loading4workRoom = true
          break
        case 'otherLink':
          if (!this.form.otherLink) {
            this.$message({
              type: 'info',
              message: '请输入职工端首页外链配置'
            })
            return
          }
          name = 'APP_HOME_OUTSIDE_LINK'
          value = JSON.stringify(this.form.otherLink)
          this.loading4otherLink = true
          break
        case 'pageFooter':
          name = 'PAGE_FOOTER_CONFIG'
          value = JSON.stringify(this.form.pageFooter)
          this.loading4pageFooter = true
          break
        case 'screenConfig':
          name = 'APP_SYS_OPEN_SCREEN'
          if (this.screenForm.isValid && this.screenImgs.length == 0) {
            this.$message({
              type: 'warning',
              message: '请至少上传一张图片'
            })
            return
          }
          const params = {
            isValid: this.screenForm.isValid, // 是否开启配置
            sceneList: this.sceneList.length > 0 ? this.sceneList : '', // 展示位置
            screenImgs: this.screenImgs.length > 0 ? this.screenImgs : '', // 开屏图片
            isAuto: this.screenForm.isAuto, // 是否自动轮播 0: 否 1：是
            autoplay: this.screenForm.isAuto === 1 ? this.screenForm.autoplay : '', // 设置轮播时间间隔
            duration: this.screenForm.duration, // 开屏图停留时间
            isClose: this.screenForm.isClose, // 是否允许手动关闭  0: 否 1：是
            closeDuration: this.screenForm.closeDuration, // 几秒后可手动关闭
            showRules: this.screenForm.showRules // 设置展示规则：0会话仅展示一次、1每个场景展示一次
          }
          value = JSON.stringify(params)
          this.loading4ScreenConfig = true
          break
        case 'integralConfig':
          name = 'INTEGRAL_DRAW_ACTIVITY'
          value = JSON.stringify(this.integralConfig)
          this.loadingintegralConfig = true
          break
        case 'classFourConfig':
          name = 'COURSE_CLASS_FOUR'
          value = JSON.stringify(this.classFourConfig)
          this.loadingclassFourConfig = true
          break
        default:
          break
      }
      if (isError) {
        return
      }
      return new Promise((resolve, reject) => {
        setDataByType({
          configName: name,
          configValue: value
        })
          .then((res) => {
            this.loadingclassFourConfig = false
            this.loadingintegralConfig = false
            this.loading4name = false
            this.loading4appname = false
            ;(this.loading4appfullname = false), (this.loading4color = false)
            this.loading4homemenu = false
            this.loading4menu = false
            this.loading4used = false
            this.loading4service = false
            this.loading4news = false
            this.loading4floatImg = false
            this.loading4words = false
            this.loading4menuName = false
            this.loadingTitle = false
            this.loadingTabBar = false
            this.loadingNewType = false
            this.loading4wxshare = false
            this.loadingCourseCategory9 = false
            this.loadingCourseContent = false
            this.loading4Live = false
            this.loading4workRoom = false
            this.loading4otherLink = false
            this.loading4pageFooter = false
            this.loading4ScreenConfig = false
            this.$message({
              title: '成功',
              message: '设置成功',
              type: 'success',
              duration: 1500
            })
            this.getSystemData(type)
          })
          .catch((error) => {
            this.loadingclassFourConfig = false
            this.loadingintegralConfig = false
            this.loading4name = false
            this.loading4appfullname = false
            this.loading4color = false
            this.loading4menu = false
            this.loading4homemenu = false
            this.loading4used = false
            this.loading4service = false
            this.loading4news = false
            this.loading4floatImg = false
            this.loading4words = false
            this.loading4menuName = false
            this.loading4wxshare = false
            this.loading4Live = false
            this.loading4workRoom = false
            this.loading4otherLink = false
            this.loading4pageFooter = false
            this.loading4ScreenConfig = false
            reject(error)
          })
      })
    },

    getData() {
      const loading = this.$loading({
        lock: true,
        text: '请稍后',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.3)'
      })
      return new Promise((resolve, reject) => {
        getEnterpriseInfo()
          .then((res) => {
            loading.close()
            this.obj = Object.assign({}, res.data.data)
          })
          .catch((error) => {
            loading.close()
            reject(error)
          })
      })
    },

    getSystemData(type) {
      let name = ''
      switch (type) {
        case 'name':
          name = 'PAGE_TOP_TITLE'
          break
        case 'color':
          name = 'THEME_COLOR'
          break
        case 'logo':
          name = 'PAGE_TOP_LOGO'
          break
        case 'loginlogo':
          name = 'BACKEND_LOGIN_LOGO'
          break
        case 'loginbg':
          name = 'BACKEND_BACKGROUND_IMG'
          break
        case 'applogo':
          name = 'APP_LOGIN_LOGO'
          break
        case 'appname':
          name = 'APP_SYS_NAME'
          break
        case 'appfullname':
          name = 'APP_SYS_NAME_ALL'
          break
        case 'apphomelogo':
          name = 'APP_HOME_LOGO'
          break
        case 'menu':
          name = 'APP_HOME'
          break
        case 'homemenu':
          name = 'APP_HOME_MENU'
          break
        case 'used':
          name = 'APP_USED'
          break
        case 'service':
          name = 'APP_SERVICE'
          break
        case 'news':
          name = 'APP_NEWS'
          break
        case 'floatImg':
          name = 'APP_FLOAT_IMG'
          break
        case 'floatImgConfig':
          name = 'APP_FLOAT_IMG_CONFIG'
          break
        case 'wordsTransform':
          name = 'WORDS_TRANSFORM'
          break
        case 'menuNameTransform':
          name = 'MENU_TRANSFORM'
          break
        case 'workerTitle':
          name = 'BROWSER_TITLE_CONFIG'
          break
        case 'tabBar':
          name = 'BROWSER_UNDER_NAVIGATION'
          break
        case 'newType':
          name = 'APP_NEW_CLASSIFY_NAME'
          break
        case 'wxShareContent':
          name = 'APP_WECHAT_SHARE_CONTENT'
          break
        case 'courseCategory9':
          name = 'APP_COURSE_CATEGORY_9'
          break
        case 'courseContent':
          name = 'APP_COURSE_CONTENT'
          break
        case 'live':
          name = 'APP_LIVE_BOOK_CONTENT'
          break
        case 'workRoom':
          name = 'APP_WORKER_STUDIO_CONTENT'
          break
        case 'otherLink':
          name = 'APP_HOME_OUTSIDE_LINK'
          break
        case 'pageFooter':
          name = 'PAGE_FOOTER_CONFIG'
          break
        case 'screenConfig':
          name = 'APP_SYS_OPEN_SCREEN'
          break
        case 'integralConfig':
          name = 'INTEGRAL_DRAW_ACTIVITY'
          break
        case 'classFourConfig':
          name = 'COURSE_CLASS_FOUR'
          break
        default:
          break
      }
      return new Promise((resolve, reject) => {
        getDataByType({
          name: name
        })
          .then((res) => {
            switch (type) {
              case 'name':
                this.form.name = res.data.data.configValue || '数字化工会管理系统'
                this.form.nameTime = res.data.data.updTime || ''
                this.$store.dispatch('GetTitle')
                window.document.title = res.data.data.configValue || '数字化工会管理系统'
                break
              case 'color':
                this.form.color = res.data.data.configValue || ''
                this.form.colorTime = res.data.data.updTime || ''
                break
              case 'logo':
                this.form.logoTime = res.data.data.updTime || ''
                break
              case 'loginlogo':
                this.form.loginlogoTime = res.data.data.updTime || ''
                break
              case 'loginbg':
                this.form.loginbgTime = res.data.data.updTime || ''
                break
              case 'appname':
                this.form.appname = res.data.data.configValue
                this.form.appnameTime = res.data.data.updTime || ''
                break
              case 'appfullname':
                this.form.appfullname = res.data.data.configValue
                this.form.appfullnameTime = res.data.data.updTime || ''
                break
              case 'applogo':
                this.form.applogoTime = res.data.data.updTime || ''
                break
              case 'apphomelogo':
                this.form.apphomelogoTime = res.data.data.updTime || ''
                break
              case 'menu':
                this.form.menu = res.data.data.configValue || ''
                this.form.menuTime = res.data.data.updTime || ''
                if (this.form.menu) {
                  const str = JSON.parse(this.form.menu)
                  if (str && str.length > 0) {
                    str.forEach((item) => {
                      if (item.page === 1 || item.page === '1') {
                        this.listone = Object.assign([], item.list)
                      } else if (item.page === 2 || item.page === '2') {
                        this.listtwo = Object.assign([], item.list)
                      } else if (item.page === 3 || item.page === '3') {
                        this.listthree = Object.assign([], item.list)
                      }
                    })
                  }
                }
                break
              case 'homemenu':
                this.form.homemenu = res.data.data.configValue || ''
                this.form.homemenuTime = res.data.data.updTime || ''
                if (this.form.homemenu) {
                  const str = JSON.parse(this.form.homemenu)
                  this.homemenu = Object.assign([], str)
                }
                break
              case 'used':
                this.form.used = res.data.data.configValue || ''
                this.form.usedTime = res.data.data.updTime || ''
                if (this.form.used) {
                  const str = JSON.parse(this.form.used)
                  if (str && str.length > 0) {
                    str.forEach((item) => {
                      if (item.page === 1 || item.page === '1') {
                        this.listusedone = Object.assign([], item.list)
                      } else if (item.page === 2 || item.page === '2') {
                        this.listusedtwo = Object.assign([], item.list)
                      }
                    })
                  }
                }
                break
              case 'service':
                this.form.service = res.data.data.configValue || ''
                this.form.serviceTime = res.data.data.updTime || ''
                if (this.form.service) {
                  const str = JSON.parse(this.form.service)
                  this.listservice = Object.assign([], str)
                }
                break
              case 'news':
                this.form.news = res.data.data.configValue || ''
                this.form.newsTime = res.data.data.updTime || ''
                if (this.form.news) {
                  const str = JSON.parse(this.form.news)
                  this.listnews = Object.assign([], str)
                }
                break
              case 'floatImg': // 浮动图标图片
                this.form.floatImgUpdTime = res.data.data.updTime || ''
                break
              case 'floatImgConfig': // 浮动图标其他配置
                this.form.floatImgConfigUpdTime = res.data.data.updTime || ''
                if (res.data.data.configValue) {
                  try {
                    const obj = JSON.parse(res.data.data.configValue)
                    this.form.linkType = obj['linkType'] || ''
                    this.form.linkAddress = obj['linkAddress'] || ''
                    if (obj['startDatetime'] && obj['endDatetime']) {
                      this.form.floatImgShowTime = [obj['startDatetime'], obj['endDatetime']]
                    }
                  } catch (e) {
                    console.log(e)
                  }
                }
                break
              case 'wordsTransform': // 敏感词语转义设置
                this.form.wordsTransformTime = res.data.data.updTime || ''
                if (res.data.data.configValue) {
                  try {
                    this.$set(this.form, 'wordsTransform', JSON.parse(res.data.data.configValue))
                  } catch (e) {
                    this.$set(this.form, 'wordsTransform', [
                      {
                        code: 'YE',
                        name: ''
                      },
                      {
                        code: 'ZHZYE',
                        name: ''
                      },
                      {
                        code: 'YEDW',
                        name: ''
                      },
                      {
                        code: 'YESY',
                        name: ''
                      },
                      {
                        code: 'JE',
                        name: ''
                      },
                      {
                        code: 'Y',
                        name: ''
                      },
                      {
                        code: 'LQ',
                        name: ''
                      },
                      {
                        code: 'ZJE',
                        name: ''
                      },
                      {
                        code: 'YEGL',
                        name: ''
                      },
                      {
                        code: 'DQSYJE',
                        name: ''
                      },
                      {
                        code: 'ZFYE',
                        name: ''
                      },
                      {
                        code: 'ZFHBYE',
                        name: ''
                      }
                    ])
                  }
                }
                break
              case 'menuNameTransform': // 敏感词语转义设置
                this.form.menuNameTransformTime = res.data.data.updTime || ''
                if (res.data.data.configValue) {
                  try {
                    this.$set(this.form, 'menuNameTransform', JSON.parse(res.data.data.configValue))
                  } catch (e) {
                    this.$set(this.form, 'menuNameTransform', [
                      {
                        code: 'GHHN',
                        name: ''
                      },
                      {
                        code: 'BMFW',
                        name: ''
                      },
                      {
                        code: 'CYLJ',
                        name: ''
                      },
                      {
                        code: 'HDZX',
                        name: ''
                      },
                      {
                        code: 'ZZJS',
                        name: ''
                      },
                      {
                        code: 'AXYZ',
                        name: ''
                      }
                    ])
                  }
                }
                break
              case 'workerTitle':
                this.form.workerTime = res.data.data.updTime || ''
                if (res.data.data.configValue) {
                  this.form.workerTitle = res.data.data.configValue
                }
                break
              case 'tabBar':
                this.form.tabBarTime = res.data.data.updTime || ''
                if (res.data.data.configValue) {
                  this.tabBarList = JSON.parse(res.data.data.configValue)
                }
                break
              case 'newType':
                try {
                  this.form.newTypeTime = res.data.data.updTime || ''
                  if (res.data.data.configValue) {
                    this.newTypeMap = JSON.parse(res.data.data.configValue)
                    this.handleNewTypeMap()
                  }
                } catch (err) {
                  this.newTypeMap = { list: [], index: [] }
                  console.log(err)
                }

                break
              case 'wxShareContent':
                try {
                  this.form.wxShareContentTime = res.data.data.updTime || ''
                  if (res.data.data.configValue) {
                    const obj = JSON.parse(res.data.data.configValue)
                    this.upload4wxshare.viewId = obj.wxShareCover
                    this.form.wxShareTitle = obj.wxShareTitle
                    this.form.wxShareDesc = obj.wxShareDesc
                    this.form.wxShareLink = obj.wxShareLink
                    this.form.wxShareCover = obj.wxShareCover
                  }
                } catch (err) {
                  console.log(err)
                }
                break
              case 'courseCategory9':
                try {
                  this.form.courseCategory9Time = res.data.data.updTime || ''
                  if (res.data.data.configValue) {
                    this.form.courseCategory9 = JSON.parse(res.data.data.configValue)
                  }
                } catch (err) {
                  console.log(err)
                }
                break
              case 'courseContent':
                try {
                  this.form.tableData4courseTime = res.data.data.updTime || ''
                  if (res.data.data.configValue) {
                    this.form.tableData4courseContent = JSON.parse(res.data.data.configValue)
                  }
                } catch (err) {
                  console.log(err)
                }
                break
              case 'live':
                try {
                  this.form.liveTime = res.data.data.updTime || ''
                  if (res.data.data.configValue) {
                    this.liveData = JSON.parse(res.data.data.configValue)
                  }
                } catch (err) {
                  console.log(err)
                }
                break
              case 'workRoom':
                try {
                  this.form.workRoomTime = res.data.data.updTime || ''
                  if (res.data.data.configValue) {
                    this.$set(this, 'workRoom', JSON.parse(res.data.data.configValue))
                  } else {
                    this.$set(this, 'workRoom', [])
                  }
                } catch (err) {
                  this.$set(this, 'workRoom', [])
                  console.log(err)
                }
                break
              case 'otherLink':
                this.form.otherLinkTime = res.data.data.updTime || ''
                if (res.data.data.configValue) {
                  this.form.otherLink = JSON.parse(res.data.data.configValue)
                }
                break
              case 'pageFooter':
                try {
                  this.form.pageFooterTime = res.data.data.updTime || ''
                  if (res.data.data.configValue) {
                    this.form.pageFooter = JSON.parse(res.data.data.configValue)
                  }
                } catch (err) {
                  console.log(err)
                }
                break
              case 'screenConfig':
                try {
                  this.form.screenTime = res.data.data.updTime || ''
                  if (res.data.data.configValue) {
                    this.screenForm = JSON.parse(res.data.data.configValue)
                    this.sceneList = this.screenForm.sceneList.length > 0 ? this.screenForm.sceneList : []
                    this.screenImgs = this.screenForm.screenImgs.length > 0 ? this.screenForm.screenImgs : []
                  }
                } catch (err) {
                  console.log(err)
                }
                break
              case 'integralConfig':
                try {
                  this.form.integralConfigTime = res.data.data.updTime || ''
                  if (res.data.data.configValue) {
                    this.integralConfig = JSON.parse(res.data.data.configValue)
                  } else {
                    this.integralConfig = { isStartlottery: false }
                  }
                } catch (err) {
                  console.log(err)
                }
                break
              case 'classFourConfig':
                try {
                  this.form.classFourTime = res.data.data.updTime || ''
                  if (res.data.data.configValue) {
                    this.classFourConfig = JSON.parse(res.data.data.configValue)
                  } else {
                    this.classFourConfig = ['1', '1']
                  }
                } catch (err) {
                  console.log(err)
                }
                break
              default:
                break
            }
          })
          .catch((error) => {
            reject(error)
          })
      })
    },
    // tabBar的编辑
    handleSubMenu(data) {
      const { n, r, i } = data
      this.iform = Object.assign({}, r)
      this.si = i
      this.number = n
      this.type = 'tabBar'
      this.visible = true
    },
    // tabBar的添加
    handleIconAdd() {
      this.number = 10
      this.type = 'tabBar'
      this.si = -1
      this.iform = {
        icon: '',
        id: 1,
        login: true,
        name: '',
        path: '',
        show: false,
        themeOne: '',
        themeThree: '',
        themeTwo: '',
        type: 2
      }
      this.visible = true
    },
    // tabBar的删除
    handleDelete(index) {
      this.tabBarList.splice(index, 1)
    },
    handleClose(falg) {
      if (!falg) {
        this.visible = false
      }
      this.visible = false
      this.iconvisible2 = false
      this.iconvisible3 = false
      this.iconvisible1 = false
      this.iconvisible = false
      this.si = ''
    },
    // 查询新闻类型配置
    queryNewTypes() {
      return new Promise((resolve, reject) => {
        queryNewTypes()
          .then((res) => {
            resolve()
            this.tableData = res.data.data
              .filter((item) => {
                return item.status === 'ZT01'
              })
              .map((item) => {
                return {
                  ...item,
                  indexStatus: false,
                  indexSort: undefined,
                  listStatus: false,
                  listSort: undefined
                }
              })
          })
          .catch((err) => {
            console.log(err)
            reject()
          })
      })
    },
    // 格式化
    handleNewTypeMap() {
      try {
        const { index, list } = this.newTypeMap
        this.tableData.forEach((item, i) => {
          index.forEach((ite) => {
            if (item.id === ite.classifyId) {
              this.$set(this.tableData[i], 'indexStatus', true)
              this.$set(this.tableData[i], 'indexSort', ite.sort)
            }
          })
          list.forEach((ite) => {
            if (item.id === ite.classifyId) {
              this.$set(this.tableData[i], 'listStatus', true)
              this.$set(this.tableData[i], 'listSort', ite.sort)
            }
          })
        })
      } catch (err) {
        console.log(err)
      }
    },
    formattingTableData(data = []) {
      const value = { index: [], list: [] }
      data
        .filter((i) => i.indexStatus)
        .forEach((ite) => {
          value.index.push({
            classifyId: ite.id,
            sort: ite.indexSort || 0
          })
        })
      data
        .filter((i) => i.listStatus)
        .forEach((ite) => {
          value.list.push({
            classifyId: ite.id,
            sort: ite.listSort || 0
          })
        })

      return value
    },
    /**
     *添加开屏图
     */
    addScreenImg() {
      if (this.screenImgs.length >= 5) {
        this.$message({
          message: '最多上传5张图片哟！',
          type: 'warning'
        })
        return
      }
      this.uploadFile.uploadType = 'screenImg'
      this.uploadFile.fileType = 'image'
      this.uploadFile.fileIndex = this.screenImgs.length - 1
      this.uploadFile.accept = 'image/*'
      this.uploadFile.showUpload = 2
    },

    /**
     * 图片上传成功
     * */
    uploadSuccess(id, files) {
      console.log('files', id, files)
      if (id) {
        if (this.uploadFile.fileType === 'image') {
          switch (this.uploadFile.uploadType) {
            // 如果是上传的开屏图
            case 'screenImg':
              const temp = {
                imgId: id,
                imgName: files[0].name,
                ossPath: files[0].ossPath,
                background: '#FFFFFF'
              }
              this.screenImgs.push(temp)
              break
            // 上传的是底部导航图片--未选中图片
            case 'footer-icon':
              this.iform.icon = this.uploadFile.isOss ? files[0].ossPath : files[0].id
              break
            // 上传的是底部导航图片--选中图片主题一
            case 'footer-themeOne':
              this.iform.themeOne = this.uploadFile.isOss ? files[0].ossPath : files[0].id
              break
            // 上传的是底部导航图片--选中图片主题一
            case 'footer-themeTwo':
              this.iform.themeTwo = this.uploadFile.isOss ? files[0].ossPath : files[0].id
              break
            // 上传的是底部导航图片--选中图片主题一
            case 'footer-themeThree':
              this.iform.themeThree = this.uploadFile.isOss ? files[0].ossPath : files[0].id
              break
            // 金刚区
            case 'homemenu':
              this.iform.icon = this.uploadFile.isOss ? files[0].ossPath : files[0].id
              break
          }
        }
      }
      this.uploadFile.showUpload = -1
    },
    /**
     * 开屏图上传之前限制文件大小
     * */
    beforeUpload(file) {
      if (file.size >= 1 * 1024 * 1024) {
        this.$message({
          message: '文件大小不能大于1M。请调整图片尺寸',
          type: 'warning'
        })
      } else {
        return new Promise((resolve, reject) => {
          resolve()
        })
      }
    },
    /**
     * 开屏图删除
     */
    screenImgDel(item, index) {
      this.$confirm('确定删除吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.screenImgs.splice(index, 1)
        })
        .catch()
    },
    getDict(code) {
      return new Promise((resolve, reject) => {
        getDictByCode(code)
          .then((response) => {
            this.dict[code] = response.data.data[0].list
            resolve()
          })
          .catch((error) => {
            reject(error)
          })
      })
    },
    /**
     *上传图标图片
     */
    addIconImg(type) {
      this.uploadFile.uploadType = type
      this.uploadFile.fileType = 'image'
      this.uploadFile.accept = 'image/*'
      this.uploadFile.showUpload = 2
    }
  }
}
</script>
<style lang="scss">
.config-pagestyle {
  padding: 10px;
  min-height: calc(100vh - 60px);
  max-height: calc(100vh - 60px);
  overflow: auto;

  table th.star div::after {
    content: '*';
    color: red;
  }

  .live-dialog {
    .el-dialog .el-dialog__body {
      padding: 0 !important;
    }
  }

  .tag-input-container {
    width: 100%;

    .input-new-tag {
      width: 70%;
      margin-top: 6px;
    }
  }

  .tip {
    font-size: 14px;
    color: $mainColor;
    margin-bottom: 10px;
  }

  &::-webkit-scrollbar {
    width: 8px;
    /*对垂直流动条有效*/
    height: 1px;
    /*对水平流动条有效*/
  }

  /** 滚动条轨道*/
  &::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
    background-color: white;
    border-radius: 3px;
  }

  /** 滚动条里面小方块*/
  &::-webkit-scrollbar-thumb {
    height: 32px;
    border-radius: 5px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
    background-color: #eaeaea;
  }

  .set-info,
  .set-card {
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);

    .el-collapse {
      border-top: none;
      border-bottom: none;

      .el-collapse-item__header {
        padding-left: 10px;
        border-bottom: none;
        overflow: hidden;
        text-overflow: ellipsis;

        .el-tag {
          margin-left: 10px;
        }

        .name {
          flex-shrink: 0;
          white-space: nowrap;
        }
      }

      .el-collapse-item__content {
        padding: 10px;
      }

      .el-collapse-item__wrap {
        border-bottom: none;
        border-top: 1px solid #e6ebf5;
      }
    }
  }

  .set-card {
    margin-top: 10px;

    .news-item {
      border-bottom: 1px solid #f7f7f8;
      line-height: 35px;

      &:last-child {
        border-bottom: none;
      }
    }

    .news-add {
      cursor: pointer;
      width: 100%;
      line-height: 40px;
      text-align: center;
      border: 1px dotted #e5e5e5;

      &:hover {
        @include border-color(1px, dotted, $mainColor);
        @include font-color($mainColor);
      }
    }

    .course-category-add {
      cursor: pointer;
      width: 180px;
      line-height: 40px;
      text-align: center;
      border: 1px dotted #e5e5e5;
      font-size: 14px;
      @include border-color(1px, dotted, $mainColor);
      @include font-color($mainColor);

      &.course {
        display: inline-block;

        &:last-child {
          margin-left: 20px;
        }
      }
    }

    .course-category-table {
      margin-top: 10px;
    }

    .select-course-category {
      .el-col {
        margin-bottom: 10px;

        &.drag-item {
          position: relative;

          .course-category-origin {
            position: absolute;
            right: 70px;
            top: 50%;
            transform: translateY(-50%);
          }

          .el-input__inner {
            padding-right: 40px;
          }
        }
      }
    }
  }

  .card-inner {
    .image {
      width: 375px;
    }
    .class_four {
      display: flex;
      .class_four_left {
      }
      .class_four_right {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }
    }
    .integral_btn {
      display: flex;
      justify-content: center;
      align-items: center;
    }
    &.screen-config-content {
      .el-col-4 {
        width: 20%;
      }

      .select-btn {
        display: inline-block;
        width: 120px;
        height: 40px;
        line-height: 40px;
        background: rgba(255, 255, 255, 1);
        @include border-color(1px, dotted, $mainColor);
        border-radius: 4px;
        font-size: 14px;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        @include font-color($mainColor);
        text-align: center;
        cursor: pointer;
        margin-bottom: 10px;
      }

      .item-screen-content {
        .el-card__body {
          padding: 5px;
          text-align: center;

          .el-input--medium {
            font-size: 12px;
          }

          .el-input__inner {
            padding: 0 10px;
          }
        }

        .el-image {
          width: 160px;
          height: 160px;
        }
      }
    }

    .inner-draggable {
      display: flex;
      justify-content: space-around;
      flex-direction: row;
      align-items: flex-start;

      .draggable-item {
      }
    }
  }

  .set-info {
    .info-item {
      padding-bottom: 8px;
      vertical-align: top;
      display: flex;

      .item-label {
        color: rgba(0, 0, 0, 1);
        font-weight: 400;
        font-size: 14px;
        line-height: 1.5715;
        text-align: start;
      }

      .item-content {
        flex: 1 1;
        color: rgba(0, 0, 0, 0.85);
        font-size: 14px;
        line-height: 1.5715;
        word-break: break-word;
        overflow-wrap: break-word;
      }
    }
  }

  .color-inner {
    display: flex;
    align-items: center;

    .inner-item {
      width: 25px;
      height: 25px;
      margin-right: 8px;
      color: #fff;
      font-size: 20px;
      font-weight: 700;
      border-radius: 2px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;

      > i {
        display: none;
      }

      &.active i {
        display: inline-block;
      }
    }
  }

  .inner-txt {
    text-align: center;
    padding: 10px 0;
  }

  .inner-explain {
    margin-top: 10px;
    line-height: 1.1;
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: flex-start;

    > i {
      margin-right: 5px;
    }

    p {
      margin: 0;
      padding: 0;
      margin-bottom: 5px;
    }
  }

  .inner-draggable {
    display: flex;
    justify-content: space-around;
    flex-direction: row;
    align-items: flex-start;

    .draggable-item {
    }
  }

  .inner-draggable1 {
    display: flex;
    justify-content: center;
    flex-direction: column;

    section {
      margin: 0 auto;
    }
  }

  .icon {
    .el-image {
      width: 40px;
      height: 40px;
      vertical-align: middle;
      border-radius: 50%;

      .image-slot {
        background: #f5f7fa;
      }
    }
  }
}
</style>
